IF ELSE ENDIF
Allows conditional branching of instruction flow based on a condition.
The condition cannot be a SELECT statement, but can be one of the following:
In each of the above cases, the condition (which represents a table of data) will evaluate to “true” – and will therefore pass the IF check – if that table has one or more rows. A table with zero rows (including tables which have an undefined structure) will evaluate to “false”.
The IF condition is followed by a block of code to execute if the condition evaluates to true, and then a closing
Take care to ensure the output of the IF and ELSE blocks have the same shape, as described in Agent Language User Guide - Inconsistent branching results.
|Examples||See Agent Language User Guide - Conditional branching using IF/ELSE/ENDIF.|