TAL Reference Manual

Equivalenced Variables
TAL Reference Manual526371-001
10-3
Examples of Equivalenced Simple Variable
Declarations
For portability to future software platforms, declare equivalenced variables that fit
entirely within the previous variable.
Examples of Equivalenced Simple Variable Declarations
1. This example equivalences a STRING variable and an INT(32) variable to an INT
array:
2. This example equivalences a simple variable to a simple pointer. The simple
variable is equivalenced to the location occupied by the simple pointer, not to the
location whose address is stored in the simple pointer:
Equivalenced Simple Pointer
An equivalenced simple pointer declaration associates a new simple pointer with a
previously declared variable.
VST1002.vsd
W[0]
W[1]
B[0]
B[2]
B[1]
B[3]
D
INT w[0:1];
STRING b = w[0];
INT(32) d = b;
VST1003.vsd
PTR = 200
G[200]
ADDR
.
.
.
INT .ptr := 200;
INT addr = ptr;
VST1004.vsd
=
[
index
]
+
offset
-
;
,
previous-identifieridentifier
type
.
.EXT