pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Example 205 Converting the extended address of I to a WADDR address
INT .EXT ea;
INT .EXT32 e32a;
INT .EXT64 e64a;
PROC p(a);
INT .a;
BEGIN
...
END;
...
p(ea); ! OKAY
p(e32a); ! OKAY
p(e64a); ! ERROR: EXT64ADDR not assignment compatible with WADDR
NOTE: The “Indirection Symbols” (page 41), .EXT32 and .EXT64 are 64-bit addressing
functionality added to the EpTAL compiler starting with SPR T0561H01^AAP. For more information,
see Appendix E, “64-bit Addressing Functionality” (page 531).
Using the PROC Formal Parameter
The @ character is not allowed on the actual parameter if the formal parameter is a PROC.
Referencing Parameters
Do not depend on the order in which parameters are allocated in memory. You must refer to each
parameter only as a named entity. Do not refer to one parameter as a base off of which you
reference other parameters.
Guidelines:
Do not treat a procedure’s formal parameters as an implied array or implied structure.
Do not index a parameter to access another parameter or local variable.
Do not perform block moves in which the source or destination spans more than one parameter.
Do not pass the address of a value parameter to another procedure that expects the address
of an array or structure.
Do not proceed through a parameter list using indexing and address calculations.
Procedure Body
A procedure body can contain local declarations, subprocedure declarations, and statements.
local-decl
is a declaration for one of:
simple variable
array (direct, indirect, or read-only)
structure (direct or indirect)
256 Procedures, Subprocedures, and Procedure Pointers