TAL Programmer's Guide
Equivalencing Structure Pointers
Using Equivalenced Variables
096254 Tandem Computers Incorporated 10–17
Equivalencing Structure Pointers to Structures
Equivalencing an extended structure pointer to an extended indirect structure is the
same as equivalencing an indirect structure to another indirect structure.
STRUCT .EXT str;
BEGIN
STRING name[0:20];
STRING addr[0:50];
END;
INT .EXT ptr (str) = str;
Primary area of user data segment
STR
321
Automatic extended data segment
ptr to STR PTR
.
.
.
Equivalencing Structure Pointers to Simple Variables or Arrays
Before you equivalence a structure pointer to a simple variable or an element of a
direct array, make sure that the simple variable or array element contains the address
of a structure:
Primary area of user data segment
STR
403
Automatic extended data segment
STR_PTR
ptr to STR
STR_ADDR
= @STR
.
.
.
STRUCT temp (*);
BEGIN
STRING s[0:71];
END;
STRUCT .EXT str;
BEGIN
STRING name[0:20];
STRING addr[0:50];
END;
INT(32) str_addr := @str;
INT .EXT str_ptr (temp)
= str_addr;
Matching Byte or Word Addressing
All guidelines for matching byte or word addressing given earlier in this section
apply to equivalenced structure pointers.