pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
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.
VARIABLE, EXTENSIBLE and RETURNSCC Procedures as Actual Parameters
You can pass a procedure or procedure pointer that includes an EXTENSIBLE, VARIABLE, or
RETURNSCC attribute as a parameter to a procedure whose formal parameter is a PROC, but you
cannot reference the PROC formal parameter identifier in a CALL statement. Instead, you must
assign the address from the formal parameter to a procedure pointer and then specify the procedure
pointer in a CALL statement.
Example 201 EXTENSIBLE Procedures as Actual Parameters
PROC p1 (i, j) EXTENSIBLE;
INT i, j;
EXTERNAL;
PROC p2( p );
PROC p;
BEGIN
PROCPTR pp(a, b) EXTENSIBLE; INT a, b; END PROCPTR;
INT i, j;
...
pp := pi;
CALL pp(i, j);
END;
PROC p3;
BEGIN
CALL p2(p1);
END;
Formal Parameter Specification
A formal parameter specification defines the parameter type of a formal parameter and whether
the parameter is a value parameter or a reference parameter.
param-type
is the parameter type of the formal parameter and can be one of the following:
Formal Parameter Specification 251