pTAL Guidelines for TAL Programmers
Coding Guidelines
pTAL Guidelines for TAL Programmers—527256-002
2-35
Parameters
For more information, see Procedure Pointers on page 3-6.
Parameters
You must change how your program uses procedure and subprocedure parameters if
it:
•
Declares formal value parameters of data type STRING
•
Passes actual parameters by using STACK and CODE( PUSH ) instructions
•
Depends on the relative memory location of one parameter to another
•
Depends on the memory location of a procedure’s parameters relative to its local
variables
•
Declares definition structures in formal parameter declarations
•
Applies an @ operator to a procedure name that it passes as an actual parameter
•
Passes the name of a procedure, procedure entry point, or procedure pointer as an
actual parameter to a formal parameter of data type PROC
Topics:
•
Formal Value Parameters of Data Type STRING on page 2-36
•
Using STACK Statements to Pass Parameters on page 2-37
•
Parameters Are Not Consecutive on page 2-37
•
Parameters and Local Variables on page 2-38
•
Parameters and Structure Layouts on page 2-39
•
@ Operator With PROC, PROCPTR, and PROCADDR Formal Parameters on
page 2-39
PROC p(a_proc);
PROCPTR a_proc(a1, a2) EXTENSIBLE;
INT a1, a2;
END PROCPTR;
BEGIN
...
CALL a_proc(1, 2);
END;
Example 2-36. Dynamic Procedure Calls With Procedure Pointers (page 2 of 2)