Other Formula Operator Element |
Other Formulat Operator Element Description |
Grouping Parenthesis: ( ) |
Use parenthesis to group expressions to clearly define the scope of formula operations involving Arithmetic and Boolean operators. At times such grouping is needed to either override operator precedence or simply clarify the intent of a formula. For examples using parenthesis and operator precedence see the Arithmetic Operators and the Boolean Operators sections.
|
If-Then-Else Conditional Statements: If [A] then [B] else [C] |
When the if-condition, [A] evaluates to: § Nonzero (i.e., True) the then-expression is evaluated and its value is returned § 0 (i.e., False) the else-expression is evaluated and its value is returned For example: If n <= 0 then (1) else (n) This expression always returns a positive number between 1 and n.
|
Reuse Formula Expressions by Referring to it by its Label: [label:] ( ) |
A formula expression can be used more than once in a statement without having to copy it as text by referring to its labeled name. A label name can contain the characters A-Z, underscore (_) and 0-9. The first letter of a label can only contain the characters A-Z or underscore (_).
For example: if AccumAvg:(avg(d-1,d1:0,m1)) <> 0
Note: the label name, AccumAvg, is defined in the above if-condition expression and then reused later in the then-expression by simply repeating its name rather than repeating the expression text: (avg(d-1,d1:0,m1)).
|