TAL Programmer's Guide
Declaring Definition Structures
Using Structures
8–4 096254 Tandem Computers Incorporated
To declare a standard indirect structure, precede the structure identifier with the
standard indirection symbol (.):
STRUCT .std_structure; !Declare standard indirect
BEGIN ! definition structure
INT a; ! (global or local scope)
INT b;
END;
For very large structures, you should use extended indirection. When you declare one
or more extended indirect structures (or arrays), the compiler allocates the automatic
extended data segment. If you also must allocate an explicit extended data segment,
follow the instructions given in Appendix B, “Managing Addressing.”
To declare an extended indirect structure, precede the structure identifier with the
extended indirection symbol (.EXT):
STRUCT .EXT ext_structure; !Declare extended indirect
BEGIN ! definition structure
INT a; ! (global or local scope)
INT b;
END;
Allocating Definition
Structures
The compiler allocates storage for direct and indirect structures as shown for arrays in
Figures 7-1 and 7-2 in Section 7, “Using Arrays.” That information is summarized here
for structures.
At the global and local levels, you can declare direct or indirect structures. At the
sublocal level, you can declare direct structures only.
Direct Structures
For each directly addressed structure, the compiler allocates space in the global, local,
and sublocal primary areas of the user data segment.
Standard Indirect Structures
For each standard indirect structure, the compiler allocates space as follows:
1. It allocates a word of storage in the global (or local) primary area of the user data
segment for an implicit standard structure pointer.
2. Next, it allocates storage for the structure in the global (or local) secondary area of
the user data segment.
3. Finally, it initializes the implicit pointer (provided in Step 1) with the 16-bit word
address of the zeroth structure occurrence.