TAL Reference Manual
Structures
TAL Reference Manual—526371-001
8-8
Usage Considerations
type
is any data type described in Section 3, Data Representation.
identifier
is the identifier of the simple variable.
Usage Considerations
You cannot initialize a simple variable when you declare it inside a structure. You can
subsequently assign a value to the simple variable by using an assignment statement.
Example of Simple Variables in Structures
This example declares simple variables in a structure:
STRUCT .inventory[0:49]; !Declare definition structure
BEGIN
INT item; !Declare three simple
FIXED(2) price; ! variables within the
INT quantity; ! structure layout
END;
Arrays Declared in Structures
An array declaration associates an identifier with a collectively stored set of elements
of the same data type. When you declare an array inside a structure, the form is:
type
is any data type described in Section 3, Data Representation.
identifier
is the identifier of the array.
lower-bound
is an INT constant expression (in the range –32,768 through 32,767) that specifies
the index (relative to the zeroth array element) of the first array element you want
allocated. Both lower and upper bounds are required.
VST0805.vsd
type
;identifier
,
[ :
]
lower-
bound
upper-
bound