pTAL Guidelines for TAL Programmers
Coding Guidelines
pTAL Guidelines for TAL Programmers—527256-002
2-41
Hardware Indicators
In TAL, you can reference a condition code anywhere an expression is valid. The
statements in Example 2-44 on page 2-41 are all valid in TAL, but none are valid in
pTAL.
Topics:
•
Hardware Indicators: Test Only in an IF Statement on page 2-42
•
Hardware Indicators: Test Only in Next Statement on page 2-42
•
Hardware Indicator: Must Be First Operand on page 2-43
•
Hardware Indicators: Where to Test on page 2-44
•
Condition Code: Testing Multiple Conditions on page 2-44
•
Hardware Indicators: Test Only the Condition Code in a Nest of IF Statements on
page 2-45
•
Hardware Indicators: Testing in a Called Procedure on page 2-46
•
Hardware Indicators: Accessing Across Procedure Calls on page 2-48
•
Returning a Condition Code on page 2-48
•
Returning a Condition Code on page 2-49
•
Condition Code: Saving the Value in a Variable on page 2-50
•
Overflow Traps Must Be Disabled to Test $OVERFLOW on page 2-51
Example 2-44. Referencing Condition Codes (TAL Only)
a := <;
CALL p( > );
WHILE = DO
BEGIN
...
END;
DO
...
READX ( ... )
UNTIL <>;
CALL chk ( <, $OVERFLOW, $CARRY);