pTAL Reference Manual (H06.03+)

Structures
HP pTAL Reference Manual523746-005
9-60
Referral Substructure
lower-bound
is an INT constant expression (in the range -32,768 through 32,767) that
specifies the index (relative to the zeroth substructure occurrence) of the first
substructure occurrence you want allocated. Each occurrence is one copy of
the substructure.
upper-bound
is an INT constant expression (in the range -32,768 through 32,767) that
specifies the index (relative to the zeroth substructure occurrence) of the last
substructure occurrence you want allocated.
To declare a single-occurrence substructure, omit both bounds or specify the
same value for both bounds.
previous-identifier
is the identifier of a simple variable, array, substructure, or pointer previously
declared in the same structure. No index is allowed with this identifier.
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.
Example 9-47. Referral Substructure Redefinition
STRUCT temp(
*
); ! Template structure
BEGIN
STRING a[0:2];
INT b;
STRING c;
END;
STRUCT .ind_struct; ! Definition structure
BEGIN
INT header[0:1];
STRING abyte;
STRUCT abc (temp) [0:1];
STRUCT xyz (temp) [0:1] = abc; ! Redefine abc as xyz
END;