pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Indirect Arrays
Figure 8 (page 182) shows how pTAL implements indirect arrays. The compiler allocates storage
for the four elements of the array a, but not for a pointer to a. References to a access the data
directly not indirectly through a pointer.
Figure 8 Indirect Array
pTAL Indirect Array
INT .A[0:3] := [10,20,30,40];
! Object date type: INT
! Address type: WADDR
Equivalenced Simple Variables
An equivalenced simple variable declaration associates a new simple variable with a previously
declared variable.
VOLATILE
specifies that the value of this variable must be maintained in memory, not in a register. Each
reference to a VOLATILE data item causes the data item to be read or written to memory even
when code is optimized. Based on the order of reads and writes in the source code, VOLATILE
also causes that precise order of memory references to be preserved, again, when code is
optimized.
type
If referral is present, type must be STRING or INT; otherwise, type is any data type
except UNSIGNED.
identifier
is the identifier of the simple equivalenced variable to be made equivalent to
previous-identifier.
previous-identifier
is the identifier of a previously declared simple variable.
182 Equivalenced Variables