pTAL Reference Manual (H06.03+)

Structures
HP pTAL Reference Manual523746-005
9-44
Definition Substructures
range
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. For a single-occurrence
substructure, omit both bounds or specify the same value for both bounds.
structure-layout
is the same BEGIN-END block as for structures. It can contain declarations for
simple variables, arrays, substructures, filler bits, filler bytes, redefinitions, simple
pointers, and structure pointers. The size of one substructure occurrence is the
size of the layout, either in odd or even bytes. The total layout for one occurrence
of the encompassing structure must not exceed 32,767 bytes.
Example 9-35. Declaring Definition Substructures
STRUCT .warehouse[0:1]; ! Two warehouses
BEGIN
STRUCT inventory [0:49]; ! Definition substructure
BEGIN ! 50 items in each warehouse
INT item_number;
FIXED(2) price;
INT on_hand;
END;
END;
[ lower-bound : ]upper-bound
VST993.vsd