pTAL Reference Manual (G06.24+, H06.09+, J06.03+)

Declaring Filler (page 147)
Declaring Simple Pointers in Structures (page 148)
Declaring Structure Pointers in Structures (page 151)
Declaring Redefinitions (page 153)
Simple Variable (page 153)
Array (page 154)
Definition Substructure (page 155)
Referral Substructure (page 157)
Simple Pointer (page 158)
Structure Pointer (page 159)
Equivalenced structures are discussed in Chapter 11 (page 177).
Structure Layout
The structure layout (or body) is a BEGIN-END block that contains declarations of structure items.
Table 42 Structure Items
DescriptionStructure Item
A single-element variableSimple variable
A variable that contains multiple elements of the same data typeArray
A structure nested within a structure (to a maximum of 64 levels)Substructure
A place-holding byteFiller byte
A place-holding bitFiller bit
A variable that contains a memory address, usually of a simple variable or array,
which you can access with this simple pointer
Simple pointer
A variable that contains the memory address of a structure, which you can access
with this structure pointer
Structure pointer
A new identifier and sometimes a new description for a substructure, simple variable,
array, or pointer declared in the same structure
Redefinition
You can nest substructures within structures (that is, you can declare a substructure within a
substructure within a substructure, and so on) as deeply as the pTAL stack allows (approximately
60 levels). The structure and each substructure has a BEGIN-END level depending on the level of
nesting.
The syntax for declaring each structure item is described after the syntax for declaring structures.
The following rules apply to all structure items:
You can declare the same identifier in different structures and substructures, but you cannot
repeat an identifier at the same BEGIN-END level.
You cannot initialize a structure item when you declare it. After you have declared it, however,
you can assign a value to it by using an assignment statement or move statement.
Structure Layout 115