IF expression THEN
<statements>
[ELSE
<statements>]
[ELSEIF expression THEN
<statements>]
ENDIF
Multiline IF statement with optional ELSE and ELSEIF cases and ending with ENDIF. Each component is on a separate line.
Evaluates ‘expression’ and performs the statement(s) following THEN if the expression is true or optionally the statement(s) following the ELSE statement if false.
The ELSEIF statement (if present) is executed if the previous condition is false and it starts a new IF chain with further ELSE and/or ELSEIF statements as required.
One ENDIF is used to terminate the multiline IF.
See also:
ELSE
ELSEIF THEN
ENDIF
IF THEN ELSE
IF THEN GOTO
Leave a Reply