An If command sequence conditionally executes blocks of code. See the pages on Comparing Expressions and Compound Conditions regarding conditional expressions. Conditions have no side effects and so neither do If and Else commands.
IF <Condition> <Block of code> [ELSE IF <Condition> <Block of code>] : [ELSE <Block of code>] .
The case form of an 'If-Else' command sequence uses Comparison Lists to compare an integer or enumerated expression to a list of one or more constants for equality. Else-Is commands compare the expression in the If command to additional constants.
IF <Expression> is <Constant List> <Block of code> [ELSE IS <Constant List> <Block of code>] : [ELSE <Block of code>] .
In this example a character is compared to various sets of literals.
IF C is '#' | '$' | '*' <Process a special character> ELSE IS '0' to '9' <Process a digit> ELSE IS 'a' to 'z' | 'A' to 'Z' <Process a letter> ELSE IS '+' | '-' <Process a sign> ELSE <Process an invalid character> .