TAL Programmer's Guide
Equivalencing Simple Pointers
Using Equivalenced Variables
10–8 096254 Tandem Computers Incorporated
You can equivalence an extended pointer to an INT(32) simple variable:
INT(32) xaddr := %2000000D;
INT .EXT xptr = xaddr;
Automatic extended data segment
Primary area of user data segment
417
XADDR =
%2000000D
XPTR
%2000000D
.
.
.
Accessing Equivalenced
Simple Pointers
After you declare an equivalenced pointer, you can access it by specifying in a
statement the identifier of the pointer or of the variable to which the pointer is
equivalenced. Suppose you equivalence a simple pointer to a simple variable as
follows:
INT dir := 200;
INT .ptr = dir;
PTR = 200
306
G[200]
DIR = 200
.
.
.
If you assign a value to the simple variable in the preceding example, you change the
content of both the simple variable and the simple pointer:
dir := 45;
PTR = 45
310
G[45]
DIR = 45
.
.
.