<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!--
Copyright (c) 2006 UGS Corp.

All Rights Reserved.

This software and related documentation are proprietary to UGS Corp.
-->
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <title>Conditional expressions</title>
      <script language="javaScript">
        abridged="false";
        displayConditions=new Array();
      </script>
      <link type="text/css" href="../css/main_styles.css" rel="stylesheet">
   </head>
   <body class="bodydocs" onload="top.pageLoader()" bgcolor="#FFFFFF">
      <div class="title_topic3" id="xps10_pagetitle">Conditional expressions</div>
      <hr noshade="true">
      <p class="para_topic">Conditional expressions can be created using an &quot;if then else&quot; structure. For example:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item"><i class="variableText">width = if (length&gt;=10) (length/2) else (5)</i></p>
         </li>
      </ul>
      <table border="0">
         <tr>
            <td valign="top" align="left"><img align="left" src="../graphics/tip.gif" alt="Tip" title="Tip"></td>
            <td valign="bottom" align="left" width="100%">
               <div class="para_tip">
                  <p class="para_tip_body">Add comments to expressions to describe variables using &quot;//&quot; after the expression and before the comment. </p>
               </div>
            </td>
         </tr>
      </table>
      <p class="para_topic">See also:</p>
      <ul class="unmarkedList">
         <li>
            <p class="para_item">Help: <img align="bottom" src="graphics/widgets/book_closed.gif" border="0"> Design &rarr; Modeling &rarr;  Modeling Tools &rarr; Expressions Editor
            </p>
         </li>
         <li>
            <p class="para_item">Help: <img align="bottom" src="graphics/widgets/book_closed.gif" border="0"> Design &rarr; Modeling &rarr;  Modeling Menu Quick Reference &rarr; Modeling Tools Options  &rarr; Expression
            </p>
         </li>
      </ul>
   </body>
</html>