Mathcad If Statements
Mathcad If Statements
Page 1 of 1
Help Center
eLearning
2 recommended topics
Knowledge Base
Search LearningConnector
Relevance
2. To add an if statement, on the Math tab, in the Operators and Symbols group, click Programming. The programming operators list opens. Click if.
Note You can type the name of a programming operators, such as "if, and then press Ctrl+J to convert the name to a programming operator with all its placeholders. 3. Condition that if the value of var is BLACK, the function returns the value WHITE as shown below. To add the Boolean equal operator for comparison, on the Math tab, in the Operators and Symbols group, click Operators. The operators list opens. Click = Equal To.
4. To add another if statement, position the cursor as shown below and press Enter.
If the cursor is positioned right after WHITE and you press Enter, Mathcad adds a line inside the if block. 5. Specify the opposite case as shown below.
Note Mathcad supports nested if statements. 6. Call reverse and change the value of a variable myvar as shown below.
http://127.0.0.1:64851/index.jspx?id=resourceid-131-01BE2B6F&action=show
6/20/2013