Conditional Expressions
About this task
The IfThen (and IfThenElse) functions are used to make conditional execution of expressions. These function expressions are evaluated the same way as any other type of expression.
The IfThen function has two arguments:
Procedure
- Condition - Requires an expression returning a Boolean value. If the result of the Boolean expression is true, the result of the IfThen function expression is the Then expression. If the result is false, the IfThen function expression returns no result.
- Then - The expression that provides the value to the IfThen function expression if the condition is true.
Results
The IfThenElse function adds a third Else argument to the IfThen function. The value of the Else argument expression is returned if the condition argument evaluated to false.