ELSE [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation
HP Pascal/iX Reference Manual
ELSE
ELSE is an HP Pascal Option.
The ELSE compiler option specifies the code to be compiled when the
Boolean expression in the IF compiler option has the value FALSE. See the
IF option for more information.
Syntax
$ELSE$
Default Not applicable.
Location Anywhere.
Example 1
$SET 'group1=FALSE'$
.
.
.
$IF 'group1'$
[source_line]
[ . ]
[ . ]
[ . ]
$ELSE$
[source_line]
[ . ]
[ . ]
[ . ]
$ENDIF$
In this example, the code following $ELSE is compiled because group1 is
set to FALSE.
Example 2
$SET 'group3=true,group2=false;group1=false'$
.
.
.
$IF 'group1'$
[source_line]
[ . ]{group1}
[ . ]
[ . ]
$ELSE$
$IF 'group2'$
[source_line]
[ . ]{group2}
[ . ]
[ . ]
$ELSE$
$IF 'group3'$
[source_line]
[ . ] {group3}
[ . ]
[ . ]
$ENDIF$
$ENDIF$
$ENDIF$
In this example, only group3 is compiled because it is set to true and
group1 and group2 are set to false.
MPE/iX 5.0 Documentation