pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Example 110 Declaring But Not Initializing a Simple Pointer
INT(32) .ptr;
Example 111 Declaring and Initializing a Simple Pointer
STRING .bytes[0:3]; ! Indirect array
STRING .s_ptr := @bytes[3]; ! Simple pointer initialized with
! address of bytes[3]
Example 112 Declaring and Initializing a STRING Simple Pointer
INT .a[0:39]; ! INT array
STRING .ptr := @a[0] '<<' 1; ! STRING simple pointer
! initialized with byte address
! of a[0]
Example 113 Declaring and Initializing Simple Pointers
INT a[0:1] := [%100000, %110000]; ! Array
INT .int_ptr1 := a[0]; ! Simple pointer
! initialized with %100000
INT .int_ptr2 := a[1]; ! Simple pointer
! initialized with %110000
Example 114 Declaring and Initializing a Simple Pointer, Using $XADR
INT a[0:1]; ! 16-bit word-addressed array
STRING .EXT s := $XADR (a[0]); ! Extended simple pointer
! initialized with
! 32-bit byte address of a[0]
Example 115 Declaring and Initializing an Extended Simple Pointer
INT .EXT32 x32 [-100:100]; ! Array
INT .EXT32 x32_ptr := @x[-1]; ! Extended simple pointer initialized
! 32-bit byte address if x32[-1];
INT .EXT64 x64 [-100:100]; ! Array
INT .EXT64 x64_ptr := @x[-1]; ! Extended simple pointer initialized
! 64-bit byte address if x32[-1];
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).
Declaring Structure Pointers
The structure pointer declaration associates a previously declared structure with the memory location
to which the structure pointer points. You access data in the associated structure by referencing
the qualified structure pointer identifier.
Declaring Structure Pointers 173