TAL Programmer's Guide

Equivalencing Structures
Using Equivalenced Variables
096254 Tandem Computers Incorporated 10–9
If you prefix @ to the pointer identifier in the preceding example and assign a value
to the pointer, you change the content of both the direct variable and the simple
pointer:
@ptr := 66; PTR = 66
311
G[66]
DIR = 66
.
.
.
If you assign a value to the simple pointer without the @ operator, you change the
content of only the variable to which the simple pointer points. Location G[66] now
contains 15:
ptr := 15; PTR = 66
312
G[66]
DIR = 66
.
.
.
15
Equivalencing
Structures
You can equivalence a new definition or referral structure to a previously declared
variable as listed in Table 10-1 earlier in this section.
If you want the new structure layout to occupy the same location as the previous
variable, be sure that you match the addressing mode of the new structure and of the
previous variable as follows:
New Structure Previous Variable
Direct structure Simple variable
Direct structure
Direct array
Standard indirect structure Standard indirect structure
Standard indirect array
Standard structure pointer
*
Extended indirect structure Extended indirect structure
Extended indirect array
Extended structure pointer
*
*
If the previous variable is a pointer, the new structure is really a pointer.
Definition structures and referral structures are described separately in the following
subsections.