MPE/iX Commands Reference Manual (32650-90877)

180 Chapter5
Command List III
Commands DATA thru EXIT
Example
The following example illustrates using the ELSE command with the IF command:
IF EXPN1 THEN
...
ELSE
IF EXPN2 THEN
...
ELSE
IF EXPN3 THEN
...
ELSE
...
ENDIF
ENDIF
ENDIF
The same result can be accomplished more efficiently by using the ELSEIF command:
IF EXPN1 THEN
...
ELSEIF EXPN2 THEN
...
ELSEIF EXPN3 THEN
...
ELSE
...
ENDIF
Notice that only one ELSE may follow an ELSEIF, while any number of ELSEIF commands
may follow an IF.
Related Information
Commands CALC, DELETEVAR, ELSE, ENDIF, IF, SETJCW, SETVAR, SHOWJCW, SHOWVAR
Manuals None
ENDIF
Terminates an IF block. (Native Mode)
Syntax
ENDIF
Parameters
None.
Operation Notes
The ENDIF command is used to terminate an IF block. The IF command, the optional ELSE
and ELSEIF commands, and the ENDIF command constitute an IF block. A logical