TAL Programmer's Guide
Equivalencing Simple Pointers
Using Equivalenced Variables
10–6 096254 Tandem Computers Incorporated
Equivalencing
Simple Pointers
You can equivalence a new simple pointer to a previously declared variable as listed
in Table 10-1 earlier in this section.
Declaring Equivalenced
Simple Pointers
To declare an equivalenced simple pointer, specify:
Any data type except UNSIGNED
The identifier of the new simple pointer, preceded by an indirection symbol
An equal sign (=)
The identifier of the previous variable
For portability to future software platforms, declare equivalenced variables that fit
within the previous variable.
Matching Byte or Word Addressing
If the previous variable is a pointer, an indirect array, or an indirect structure, the
previous pointer and the new pointer must both contain either:
A standard byte address
A standard word address
An extended address
Otherwise, the pointers will point to different locations, even if they both contain the
same value. That is, a standard STRING or extended pointer normally points to a
byte address, and a standard pointer of any other data type normally points to a
word address.
When you equivalence standard pointers, ensure that the byte or word addressing
match. For example, INT and INT(32) standard pointers both contain a word
address:
INT .ptr1 := 200;
INT(32) .ptr2 = ptr1;
307
PTR2 = 200PTR1 = 200
.
.
.
G[200]