pTAL Conversion Guide

Procedures, Subprocedures, and Procedure
Pointers
pTAL Conversion Guide527302-002
16-17
Procedure Parameters
Procedure Parameters
Topics:
Dynamically selected procedure calls
Passing parameters to VARIABLE and EXTENSIBLE procedures
VARIABLE, EXTENSIBLE, and RETURNSCC procedures as actual parameters
Passing STRING value parameters
Passing a .EXT actual parameter to a nonEXT reference parameter
Declaring STRUCTs as formal parameters
When a procedure is called, each actual parameter is bound to its corresponding
formal parameter. Parameters passed by value must follow the same rules for
assignment compatibility as do assignment statements. Each actual value parameter
corresponds to the right side of an assignment statement. Each formal value
parameter corresponds to the left side of an assignment statement.
Topics:
Dynamically Selected Procedure Calls on page 16-17
Parameters and VARIABLE and EXTENSIBLE Procedures on page 16-19
VARIABLE, EXTENSIBLE, and RETURNSCC Procedures as Actual Parameters
on page 16-19
Using Formal STRING Value Parameters on page 16-20
Passing a .EXT Parameter to a Non-EXT Reference Parameter on page 16-21
Declaring STRUCTs as Formal Parameters on page 16-21
Referencing Parameters on page 16-23
Dynamically Selected Procedure Calls
TAL
In TAL, you can use a CODE(DPCL) instruction to dynamically select a procedure to
call.
pTAL
pTAL does not support CODE statements. You can use a PROCPTR to dynamically
select a procedure to call, as inExample 16-13 on page 16-18.