TAL Programmer's Guide
Declaring Redefinitions
Using Structures
8–26 096254 Tandem Computers Incorporated
For example, you can declare a referral substructure redefinition that uses a template
structure layout:
STRUCT temp(
*
); !Declare template structure
BEGIN
STRING a[0:2];
INT b;
STRING c;
END;
STRUCT .ind_struct; !Declare definition structure
BEGIN
INT header[0:1];
STRING abyte;
STRUCT abc(temp) [0:1]; !Declare ABC
STRUCT xyz(temp) [0:1] = abc;
!Redefine ABC as XYZ
END;
Simple Pointers
as Redefinitions
To declare a simple pointer that redefines a previously declared item within the same
structure, specify:
Any data type except UNSIGNED
The identifier of the new pointer, preceded by an indirection symbol (. or .EXT)
An equal sign (=)
The identifier of a previous item at the same BEGIN-END level of the structure—a
simple variable, array, pointer, or substructure
For example, you can declare new simple pointer EXT_POINTER to redefine simple
variable VAR as follows:
STRUCT my_struct;
BEGIN
STRING var[0:5];
STRING .EXT ext_pointer = var; !Redefinition
END;
Structure Pointers
as Redefinitions
To declare a structure pointer that redefines a previously declared item within the
same structure, specify:
STRING or INT attribute, as described in Table 8-5 earlier in this section
The identifier of the new pointer, preceded by an indirection symbol (. or .EXT)
A referral that provides the structure layout—enclose in parentheses the identifier
of an existing structure or structure pointer or of the encompassing structure
An equal sign (=)
The identifier of a previous item at the same BEGIN-END level of the structure—a
simple variable, array, pointer, or substructure