pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Indirection
., .EXT, .EXT32, .EXT64, .SG, and .SGX are indirection symbols (see Table 14 (page 41)).
identifier
is the identifier of the new referral structure.
referral
is the identifier of a previously declared structure or structure pointer that provides the structure
layout for this structure.
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 82 (page 142) 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 82 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
Declaring Simple Variables in Structures
The simple variable declaration associates a name with a single-element data item. When you
declare a simple variable inside a structure, the form is:
142 Structures