pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
previous-identifier
is the identifier of a simple variable, array, substructure, or pointer previously declared in the
same structure. You cannot specify an index with this identifier.
In a redefinition, the new item and the previous (nonpointer) item both must have a byte address
or both must have a word address. If the previous item is a pointer, the data it points to must be
word addressed or byte addressed to match the new item.
Example 94 (page 154) redefines the left byte of int_var as string_var.
Example 94 Simple Variable Redefinition
STRUCT .mystruct;
BEGIN
INT int_var;
STRING string_var = int_var; ! Redefinition
END;
Array
An array redefinition associates a new array with a previous item at the same BEGIN-END level
of a structure.
type
is any data type except UNSIGNED.
identifier
is the identifier of the new array.
range
lower-bound
is an INT constant expression (in the range -32,768 through 32,767) that specifies the
index (relative to the zeroth element) of the first array element you want allocated.
upper-bound
is an INT constant expression (in the range -32,768 through 32,767) that specifies the
index (relative to the zeroth element) of the last array element you want allocated.
previous-identifier
is the identifier of a simple variable, array, substructure, or pointer previously declared in the
same structure. You cannot specify an index with this identifier.
In a redefinition, the new item and the previous (nonpointer) item both must have a byte address
or both must have a word address. If the previous item is a pointer, the data it points to must be
word addressed or byte addressed to match the new item.
154 Structures