pTAL Reference Manual (H06.03+)

Procedures, Subprocedures, and Procedure
Pointers
HP pTAL Reference Manual523746-005
14-8
Parameters and VARIABLE and EXTENSIBLE
Procedures
RETURNSCC
causes a procedure to return a condition code. The compiler reports an error if a
procedure attempts to test the condition code after calling a procedure that does
not specify RETURNSCC. Procedures declared with RETURNSCC cannot return
64-bit values.
OVERFLOW_TRAPS
enables overflow traps for a procedure.
NOOVERFLOW_TRAPS
disables overflow traps for a procedure.
LANGUAGE
specifies that the external routine is an HP C, HP COBOL, FORTRAN, or Pascal
routine. If you do not know if the external routine is an HP C, HP COBOL,
FORTRAN, or Pascal routine, use LANGUAGE UNSPECIFIED. The following
example shows the LANGUAGE COBOL option and a public name "a_proc" (in
HP COBOL identifier format):
PROC a_proc = "a-proc" (a, b, c) ! EXTERNAL declaration for
LANGUAGE COBOL; ! HP COBOL procedure
STRING .a, .b, .c;
EXTERNAL;
Specify no more than one LANGUAGE attribute in a declaration.
If a procedure declaration includes LANGUAGE, it must also include public-name-
spec on page 14-2.
Parameters and VARIABLE and EXTENSIBLE Procedures
To determine which parameters were passed by the caller, use the $PARAM on
page 15-77.
Memory is allocated for all parameters to VARIABLE procedures or EXTENSIBLE
procedures; therefore, your program can store default values for parameters the caller
does not pass.
Note. The EpTAL compiler issues a warning if a procedure that has this attribute returns
both a traditional function value and a condition code value by means of RETURN on
page 12-34. The reason for this warning is in Appendix D, RETURN, RETURNSCC, and
C/C++ on TNS/E.
Note. Because no FORTRAN or Pascal compilers exist especially for TNS/R or TNS/E
architecture, LANGUAGE FORTRAN and LANGUAGE PASCAL have no meaning on
TNS/R or TNS/E architecture.