Contents Up << >>
If statements
The if statement is used to conditionally execute a block of sequential
statements. The syntax for the if statement is:
The condition parts are boolean expressions. If the first condition
evaluates to true, then the sequential statement list that follows the
THEN will be executed. If the condition evaluates to false, then the
next condition (an ELSIF part) is evaluated and the following statement
list will be executed if it is true. This continues until a condition
evaluates to
true or all conditions have been evaluated. If all conditions evaluate
to false and there is an ELSE part, then the sequential statement list
of the ELSE part is executed. If more than one condition is true
then only the statement list of the the first one is executed.