pTAL Reference Manual (H06.08+)
Hardware Indicators
HP pTAL Reference Manual—523746-006
13-15
Returning a Condition Code to the Calling Procedure
Returning a Condition Code to the Calling Procedure
A called procedure can return a condition code value to its caller by using the
RETURNSCC procedure attribute in its procedure or subprocedure declaration and a
RETURN statement.
For more information:
Example 13-6. Testing a Hardware Indicator Set in a Calling Procedure
PROC b(status); ! Called procedure
INT status;
BEGIN
IF status <> 0 THEN ... ! Test parameter value from PROC a
END;
PROC a; ! Calling procedure
BEGIN
INT i, j, k;
...
j := i;
IF <> THEN k := 1 ! Test hardware indicator and set k
ELSE k := 0;k
CALL b(k); ! Call PROC b, passing k
END;
Topic Source
Procedure declarations Procedure Declarations
on page 14-2
Subprocedure declarations Subprocedure Declarations
on page 14-19
RETURNSCC procedure attribute Procedure Attributes
on page 14-5
RETURN statement RETURN
on page 12-34










