Download Print this page

Motorola EXORdisk II User Manual page 87

Advertisement

CHAIN COMMAND
6.3 --
Compilation Operators
6.3.3 XIF
and
ELSE
operators
Two Compilation Operators can cause the range of
an
IF
operator
to
be
ended.
The XIF operator marks the end of a
series
of
conditionally
compiled
statements.
The
ELSE
operator
reverses
the sense of the IF's test condition, and
is
use~
to indicate what is compiled if the test condition is
net
met.
The
conditional
IF operators can be nested to a
depth of sixteen levels.
The following example shows the
use
OT
XIF and
ELSE:
IIFS
LIST
LIST TESTFILEiLH
TEST
PROGRAM
HEADING
LINE
IELSE
LIST
TESTFILE
IXIF
In
this
exampleJ
the
file
TESTFILE will be listed on the
printer only if the
tag
LIST
is
specified
on
the
CHAIN
c emma n
d
1
in e .
A
h
e ad
i
n
9 ,
1 i
n e
i
sal sop r
0
v ide
d
lIJ
i t h i
nth e
CHAIN
file if the
LIST
tag is used.
If,
however, LIST is not
specified,
then the
ELSE
portion of the conditional operator
~ill
be
compiled, causing TESTFILE to be shown on the
s~stem
console instead.
If
the above example were to be written without the ELSE
ope't'ator, - one additional IF and
XIF
operator pair
Ulould
have
to be used, as shown:
IIFS LIST
LIST TESTFILEiLH
TEST PROGRAM HEADING LINE
/XIF
lIFe
LIST
LIST
TESTFILE
/XIF
It
can
be
seen that the use of the ELSE operator makes the
CHAIN file easier to understand.
Each
IF
operator must have a corresponding
XIF
operator.
The
ELSE
operator
is
available at the option of the user.
The following example shows
ho~
nested
IF
operators
might
appear in a CHAIN file:
IIFS Fl
ASM
TESTPROG
/
IFS F2
EXBIN TESTPROG
/
. XIF
/XIF
Page
06-07

Advertisement

loading

This manual is also suitable for:

Exordisk iii