Contents - Index


IF THEN ELSE (Macro Command)

 

IF (X<=Y) OR (Y=2) THEN Z=3 ELSE Z=4

The IF THEN ELSE command in a macro file can test variables that have been defined in the macro or set in the previous execution of the Solve command.  The tests can use any of the following logic operators: <, <=,  =,  <>,  >, >=  .  The IF test can use one or more AND and OR operators.  The AND and OR must be surrounded by one or more spaces.  The order of the logical operations can be controlled by parentheses.  The entire command must be all on one line.  The ELSE clause is optional. The IF command will usually be used with the GOTO command and line labels.  Note that X and Y can be string constants or string variables.  However, in this case, only the = and the <> logic operators are applicable.

 

MacroCommands