4.5. IF


        IF lexpr THEN
        [ ELSIF lexpr2 THEN
          statement_block ]
        [ ELSE
          statement_block ]
        END IF

This creates a test, or series of tests. The statement_block under the first lexpr that evaluates to 1 will be executed. Any number of ELSIF clauses are allowed. If no lexpr evaluates to true and the ELSE clause exists, the statement_block for the ELSE clause will be executed.

A special case of the IF statement is when any lexpr is a constant 0. In this case, the statement block is not parsed. This can be used for block comments.

        IF 0

        this is a dummy block that won't even be parsed!

        END IF


        IF x == 5 THEN
          y = 7
        ELSIF x == 6 THEN
          y = 12
          y = 0
        END IF