Overview | Statement List | Example
IF/numerical expression,[label1:],[label2:],[label3:]
This statement provides multiple choice branching based on the results of a numerical expression.
numerical expression |
A numerical expression which may be a constant, a variable or a combination of constants and variables. |
[label1:],[label2:],[label3:] |
The statement labels to where the program branches based on the results of the numerical expression. If the outcome of the expression is less than zero, the program branches to the statement with the label "label1:". If the outcome of the expression is equal to zero, the program branches to the statement with the label "label2:". If the outcome of the expression is greater than zero, the program branches to the statement with the label "label3:". |
NOTE: All of the labels in the IF statement above are optional,
therefore, if a label is not given for the outcome of the expression, the next
executable statement in the program is executed.