TAL Reference Manual

Structures
TAL Reference Manual526371-001
8-2
Structure Layout
Structure Layout
The structure layout (or body) is a BEGIN-END construct that contains declarations of
structure items. Table 8-2
lists structure items.
You can nest substructures within structures up to 64 levels deep. That is, you can
declare a substructure within a substructure within a substructure, and so on, for up to
64 levels. The structure and each substructure has a BEGIN-END level depending on
the level of nesting.
The limit is 64 for direct substructures such as:
STRUCT A;
BEGIN
STRUCT B;
BEGIN
...
END;
END;
However, for indirect substructures, this limit is smaller depending on the complexity of
the structure.
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 or move
statement.
Table 8-2. Structure Items
Structure Item Description
Simple Variable A single-element variable
Array A variable that contains multiple elements of the same data type
Substructure A structure nested within a structure (to a maximum of 64 levels)
Filler Byte A place-holding byte
Filler Bit A place-holding bit
Simple Pointer A variable that contains a memory address, usually of a simple
variable or array, which you can access with this simple pointer
Structure Pointer A variable that contains the memory address of a structure, which
you can access with this structure pointer
Redefinition A new identifier and sometimes a new description for a substructure,
simple variable, array, or pointer declared in the same structure