TAL Programmer's Guide
Declaring Redefinitions
Using Structures
096254 Tandem Computers Incorporated 8–25
Alignment of Substructure Redefinitions
The new substructure must have the same byte or word alignment as the previous
substructure. That is, if the previous substructure starts on an odd byte, the first item
in the new substructure must be a STRING item.
The following substructures (B and C) both begin on an odd-byte boundary:
STRUCT a;
BEGIN
STRING x;
STRUCT b; !B starts on odd byte
BEGIN
STRING y;
END;
STRUCT c = b; !Redefine B as C, also on odd byte
BEGIN
STRING z;
END;
END;
XY
396
/ / / Z
CB
Referral Substructures
as Redefinitions
To declare a referral substructure that redefines a previously declared item within the
same structure, specify:
The keyword STRUCT
The identifier of the new substructure
A referral that provides a layout—enclose in parentheses the identifier of an
existing structure (except the encompassing structure) or structure pointer
Optional bounds—if you omit the bounds, the default bounds are [0:0] (one
occurrence)
An equal sign (=)
The identifier of a previous item at the same BEGIN-END level of the structure—the
previous item can be a simple variable, array, pointer, or substructure
A semicolon
If the previous item is a substructure and you omit the bounds or if either bound is 0,
the new substructure and the previous substructure occupy the same space and have
the same offset from the beginning of the structure.