The if command allows commands to be executed conditionally.
Syntax:
if (<condition>) <command-line>
The <condition> will be evaluated, if it is true (non-zero), then the command(s) of the <command-line> will be executed. If the <condition> is false (equals zero), then the entire <command-line> is ignored. Note that use of ';' to allow multiple commands on the same line will NOT end the conditionalized commands.
Examples:
pi=3
if (pi!=acos(-1)) pause 0 "?Fixing pi!";pi=acos(-1);show variables
will display:
?Fixing pi!
Variables:
pi = 3.14159
or
if (1==2) pause 0 "Never see this";pause 0 "Or this either"
will not display anything.