Conditional branching
if <int> <statement>
Executes a <statement>, if <int> is non-zero.
; If A>1, jump to ':label'. if A>1 goto label ; If result<>0, assign 0 to A. if result A=0
if <int 1> then ... (Statements for the case: <int 1> is true (non-zero).) ... [elseif <int 2> then] ... (Statements for the case: <int 1> is false (zero) and <int 2> is true.) ... [elseif <int N> then] ... (Statements for the case: <int 1>, <int 2>,... and <int N-1> are all false, and <int N> is true.) ... [else] ... (Statements for the case: all the conditions above are false (zero).) ... endif
'if' and 'elseif' statements must end with 'then'.
'elseif' and 'else' can be omitted.
'endif' can not be omitted.
if a=1 then b = 1 c = 2 d = 3 endif if i<0 then i=0 else i=i+1 endif if i=1 then c = '1' elseif i=2 then c = '2' elseif i=3 then c = '3' else c = '?' endif