pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
pTAL does not verify that the lengths of the objects to which an equivalenced pointer refers are
equal. pTAL accepts the declaration in Example 126 (page 187) because the address types of both
pointers are WADDR.
Example 126 Equivalenced Objects of Unequal Length
INT .a; ! a is a pointer to an INT
FIXED .b = a; ! OK: a and b are pointers; pTAL does not require
! that the data referenced by b be contained
! inside the data referenced by a
REFALIGNED Clause for Equivalenced Simple Pointers
The REFALIGNED clause assigns a REFALIGNED attribute (2 or 8) to a simple equivalenced pointer
when you declare the pointer. Equivalenced pointers do not inherit the reference alignment of the
previous variable.
Example 127 REFALIGNED Clause for Equivalenced Simple Pointers
?REFALIGNED(8) ! Default reference alignment is 8
INT .p REFALIGNED(2); ! Reference alignment of p is 2
INT .q REFALIGNED(8) = p; ! Reference alignment of q is 8
INT .r REFALIGNED(2) = p; ! Reference alignment of r is 2
INT .s = p; ! Reference alignment of s is 8
INT .t; ! Reference alignment of t is 8
Equivalencing Procedure Addresses (PROCADDR, PROC32ADDR, and
PROC64ADDR) and Pointer Variables (PROCPTR, PROC32PTR, and
PROC64PTR)
You can equivalence Pointer Variables to Procedure Addresses and other Pointer Variables, and
you can equivalence Procedure Addresses to Pointer Variables and other Procedure Addresses.
NOTE: The procedure address and pointer types, PROC32ADDR, PROC64ADDR, PROC32PTR,
and PROC64PTR 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).
Equivalencing Procedure Addresses (PROCADDR, PROC32ADDR, and PROC64ADDR) and Pointer Variables (PROCPTR,
PROC32PTR, and PROC64PTR)
187