TAL Programmer's Guide

Mixed-Language Features of TAL
Mixed-Language Programming
17–4 096254 Tandem Computers Incorporated
PROC Parameter Type Specify a procedure as a formal PROC parameter in a TAL routine that expects one of
the following actual parameters:
A C small-memory-model routine
A FORTRAN routine compiled with the NOEXTENDEDREF directive
A TAL routine
TAL Receiving PROC Parameters
The following TAL routine declares a formal PROC parameter:
PROC tal_proc (param_proc);
PROC param_proc; !Formal PROC parameter
BEGIN
!Lots of code
END;
The following callers can call a TAL routine that declares a formal PROC parameter:
C small-memory-model routines
COBOL85 routines
FORTRAN routines compiled with the NOEXTENDEDREF directive
TAL routines
When a caller lists an appropriate routine in the calling sequence, the caller’s compiler
passes the routine’s 16-bit address of PEP and map information.
TAL Passing PROC Parameters
A TAL routine can pass actual PROC parameters to any of the following routines:
C small-memory-model routines
FORTRAN routines compiled with the NOEXTENDEDREF directive
TAL routines
If the actual PROC parameter is a C or FORTRAN routine, specify an EXTERNAL
procedure declaration such as:
PROC c_func (param_proc) LANGUAGE C;
PROC param_proc; !Formal PROC parameter
EXTERNAL;
Additional guidelines are provided later in this section in:
“TAL Routines as Parameters to C”
“C Routines as Parameters to TAL”