pTAL Reference Manual (H06.08+)

Equivalenced Variables
HP pTAL Reference Manual523746-006
11-8
Indirect Arrays
Indirect Arrays
Figure 11-1 on page 11-8 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.
Equivalenced Simple Variables
An equivalenced simple variable declaration associates a new simple variable with a
previously declared variable.
Figure 11-1. Indirect Array
pTAL Indirect Array
INT .A[0:3] := [10,20,30,40];
! Object date type: INT
! Address type: WADDR
10
20
30
40
A: 1000
1001
1002
1003
VST121.vsd
VOLATILE
type
identifier
(
referral
)
previous-identifier
,
[
=
+
-
offset
index
]
;
VST004.vsd