User guide

2.3. COMMANDS 23
used, the appropriate 8 bit location is updated by the least significant 8 bits of
E.
If the left hand side is of the form S OFE then the field specified by the selector
S in the structure pointed to by E is updated. S must be a manifest expression
(typically a manifest name with a value specified using the SLCT operator). For
more details see the specification of SLCT on page 19.
A multiple assignment has the following form:
L
1
,..,L
n
:= E
1
,..,E
n
This construct allows a sin gl e command to make several assi gnments with ou t
needing to be enclosed in section brackets. The assignm ents are done from left
and is eqivalent to:
L
1
:=E
1
;. . . ; L
n
:= E
n
In extended BCPL compiled using xbcpl, in addition to := the assignment
oparator of the form op:= where op is one of: !, *, /, +, -, #*, #/, #+, #-, &, |,
EQV or XOR. The assignment E1 op:= E2 is equivalent to E1 := E1 op E2 bu t
is more compact and typically implemented more efficiently. The operators !,
#*, #/, #+ and #- are only allowed if the target field is a full BCPL word. So
the leading operator of the left hand side may not be % nor OF unless the fi el d
specified is a full BCPL word.
In extended BCPL a multiple assignment has the form:
L
1
,..,L
n
op:= E
1
,..,E
n
The assignments are d one from left and is equivalent to:
L
1
op:=E
1
;. . . ; L
n
op:= E
n
These ex t en d ed assignment opera t or s are onl y available in the extended ver-
sion of the BCPL compil er xbcpl.
2.3.2 Routine Calls
Both function calls and method calls as described in sections 2.2. 3 and 2.2.4 are
allowed to be executed as commands. Any results produced are discar d ed.
2.3.3 Conditional Commands
The syntax of the three conditional commands is as follows:
IF E DO C
1
UNLESS E DO C
2
TEST E THEN C
1
ELSE C
2