pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
! not accessible
a[9] := i; ! Index: condition code is not accessible
i.<3:5> := a; ! Bit Selection: condition code is
! not accessible
Example 195 Assignments After Which You Can Test Condition Codes
INT m;
PROC p(x, y);
INT x;
INT .y;
BEGIN
INT a[0:9];
INT i;
INT .EXT k;
INT(32) j;
STRING str;
REAL r;
EXTADDR SUBPROC f(x) RETURNSCC;
INT x;
BEGIN
RETURN %200000D, x;
END;
STRUCT s;
BEGIN
INT s1[0:4];
INT s2;
END;
i := k; ! OK: Left and right sides are simple
i := i + 1; ! OK: Left and right sides are simple
x := x + 1; ! OK: Left side is value parameter,
! right side is INT
@k := f(0); ! OK: Left side is pointer cell,
! right side is RETURNSCC function
y := i + 1; ! ERROR: Left side is reference parameter
a[i] := a[i+1]; ! ERROR: Left side has index
s.s1[0] := i; ! ERROR: Left side has field and index
s.s2 := i; ! ERROR: Left side has field reference
i.<0:8> := i; ! ERROR: Left side has bit selection
i := str; ! ERROR: Right side is 1-byte item
i := $ABS(i); ! ERROR: Right side is call to
! built-in routine
@k := @k + 1D; ! ERROR: Right side is address type
r := r + 1.0E0; ! ERROR: Right side is floating-point type
END;
Hardware Indicators in Conditional Expressions
Hardware indicators can appear in conditional expressions in these statements:
• DO-UNTIL (page 210)
The last statement in the DO-UNTIL statement must set the hardware indicator. The last statement
can be nested in a BEGIN...END statement. See Example 196 (page 240).
• IF (page 217)
These are valid references to hardware indicators:
Hardware Indicators in Conditional Expressions 239