TAL Programmer's Guide
Equivalencing Simple Variables
Using Equivalenced Variables
096254 Tandem Computers Incorporated 10–3
Equivalencing Simple Variables to Simple Pointers
If you equivalence 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 pointer:
INT .ptr := 200;
INT addr = ptr;
332
ADDRPTR = 200
.
.
.
G[200]
Avoid Equivalencing Simple Variables to Indirect Variables
If you equivalence a simple variable to an indirect variable, the simple variable is
equivalenced to the location occupied by the implicit pointer, not to the location of
the data whose address is stored in the implicit pointer.
Therefore, avoid equivalencing a simple variable to a standard indirect array:
INT .array[0:9];
INT var = array;
327
ptr to ARRAY
User data segment
Primary area
Secondary area
VAR
.
.
.
ARRAY
.
.
.