Conditional statements

`IF...THEN` statements can only be used in script files. The general form of an `IF...THEN` statement is:

`IF (boolean) THEN`

The `boolean` can take any form, but must be enclosed in parentheses, and it must have a scalar result. A result of `1` is true, while anything else is false. An `IF...THEN` statement can precede a single command. An `IF...THEN` statement can begin a block of commands, but in that case it must be terminated with an `ENDIF` statement. Nested `IF...THEN` statements are allowed.

Example

     ...
     IF (A>B) THEN TEXT 'A > B'
     IF (A=B) THEN TEXT 'A = B'
     IF (A<B) THEN TEXT 'A < B'
     ...

Example

     ...
     IF (A>B) THEN
      ...
     ENDIF
     ...

Example

     ...
     START2:
     IF (J<=8) THEN
      ...
      J=J+1
      GOTO START2
     ENDIF
     ...

Looping