pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

IF $OVERFLOW THEN ...
IF $CARRY THEN ...
IF < THEN ...
WHILE (page 232)
Both the statement preceding the WHILE statement and the last statement in the WHILE statement
must set the condition code indicator. See Example 197 (page 240).
Example 196 Hardware Indicators in DO-UNTIL Statements
proc p returnscc;
begin
...
end;
proc q;
begin
...
end;
do
call p () ! Sets condition code indicator
until = ; ! OK
do
begin
...
call p ();
end
until = ; ! OK
do
begin
...
call q ();
end
until > ; ! ERROR: last statement in do-until statement
! does not set condition indicator
int i := 0;
...
do
begin
...
i := i + 1;
end
until $overflow; ! ERROR: $overflow and $carry not allowed
! in do-until statement
Example 197 Hardware Indicators in WHILE Statements
int proc p;
begin
...
end;
proc q;
begin
end;
call p (); ! Sets condition code indicator
while >= do ! OK
call p (); ! Sets condition code indicator
240 Hardware Indicators