TAL Programmer's Guide
Equivalencing Structures
Using Equivalenced Variables
10–12 096254 Tandem Computers Incorporated
Equivalencing Structures to Arrays
You can equivalence a structure to an array. The following example equivalences a
standard indirect structure to a standard indirect array:
STRING .array[0:127];
STRUCT .str = array;
BEGIN
STRING name[0:63];
STRING addr[0:63];
END;
ptr to ARRAY
Primary area
ARRAY
Secondary area
318
ptr to STR
STR
.
.
.
.
.
.
.
.
.
You can equivalence an extended indirect structure to an extended indirect array:
INT .EXT xarray[0:127];
STRUCT .EXT xstr = xarray;
BEGIN
STRING name[0:30];
STRING addr[0:40];
END;
Primary area of user data segment
XARRAY
401
XSTR
Automatic extended data segment
.
.
.
ptr to XARRAY ptr to XSTR
.
.
.