[top] [prev] [next]

If

An IF statement has the form:

    IF    B_1 THEN S_1
    ELSIF B_2 THEN S_2
      ...
    ELSIF B_n THEN S_n
    ELSE S_0
    END

where the B's are boolean expressions and the S's are statements. The "ELSE S_0" and each "ELSIF B_i THEN S_i" are optional.

The statement evaluates the B's in order until some B_i evaluates to TRUE, and then executes S_i. If none of the expressions evaluates to TRUE and "ELSE S_0" is present, S_0 is executed. If none of the expressions evaluates to TRUE and "ELSE S_0" is absent, the statement is a no-op (except for any side-effects of the B's).

[top] [prev] [next]