Programmer Guide/Command Reference/IF: Difference between revisions
From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import) |
(→IF) |
||
Line 8: | Line 8: | ||
<code>IFNOT <var>condition command</var></code> | <code>IFNOT <var>condition command</var></code> | ||
Conditional execution of a command. For more information on conditions see [[Programmer Guide/Command | Conditional execution of a command. For more information on conditions see [[Programmer Guide/Command Reference_Intro/condition|condition]]. | ||
<code>IF condition THEN</code> | <code>IF condition THEN</code> |
Revision as of 17:23, 22 March 2011
IF
There are two forms of the IF
syntax. The first allows the conditional execution of one command. The second allows conditional execution of multiple command within a block.
IF condition command
IFNOT condition command
Conditional execution of a command. For more information on conditions see condition.
IF condition THEN
...
ELSE IF condition THEN
...
ELSE IFNOT condition THEN
...
ELSE
...
END
Conditional execution of command blocks. Only the IF
clause is necessary, all others are optional. Both command forms IF
and IFNOT
can be used. Empty clauses (without commands) are allowed. The last clause must be closed with END
. For more information on conditions see condition.