pTAL Reference Manual (H06.03+)
Structures
HP pTAL Reference Manual—523746-005
9-39
Declaring Referral Structures
range
lower-bound
is an INT constant expression (in the range -32,768 through 32,767) that
specifies the index (relative to the zeroth structure occurrence) of the first
structure occurrence you want to allocate. Each occurrence is one copy of the
structure.
upper-bound
is an INT constant expression (in the range -32,768 through 32,767) that
specifies the index (relative to the zeroth structure occurrence) of the last
structure occurrence you want to allocate. For a single-occurrence structure,
omit both bounds or specify the same value for both bounds.
The compiler allocates storage for the referral structure based on the following
characteristics:
•
The addressing mode and number of occurrences specified in the new declaration
•
The layout of the previous declaration
Structures declared in subprocedures must be directly addressed.
Structures always start on a word boundary.
Example 9-31 on page 9-39 declares a template structure and a referral structure that
references the template structure. The referral structure imposes its addressing mode
and number of occurrences on the layout of the template structure.
Example 9-31. Referral Structure That References a Template Structure
STRUCT record (
*
); ! Declare template structure
BEGIN
STRING name[0:19];
STRING addr[0:29];
INT acct;
END;
STRUCT .customer (record) [1:50]; ! Declare referral structure
[ lower-bound : ]upper-bound
VST993.vsd










