TACL Reference Manual
Variables
HP NonStop TACL Reference Manual—429513-018
4-23
Redefining a Structure
LIKE startup_message;
END;
]
Redefining a Structure
A redefinition declares a new name and description for an existing data item or
substructure. This functionality is similar to a redefine in TAL or a variant record in
Pascal. The syntax for a redefinition declaration is:
type identifier [ ( lower-bound : upper-bound ) ]
REDEFINES previous-identifier ;
[ structure-body ]
type
is one of the data types defined in Declaring a Simple Data Item on page 4-15.
identifier
is the name of the new data item that redefines an existing data item, at the same
structure-nesting level. The new item can be a simple data item, an array data
item, or a substructure.
lower-bound
is a value in the range -32768 to +32767 that defines the number of the first array
element of an array data item; it must be less than or equal to upper-bound.
upper-bound
is a value in the range -32768 to +32767 that defines the number of the last array
element of an array data item; it must be greater than or equal to lower-bound.
previous-identifier
is the name of a data item previously declared at the same structure nesting level.
You cannot specify array bounds with this name.
structure-body
is used only when redefining a substructure ( type is STRUCT); it contains the
declarations that describe the new substructure.
Considerations
•
A redefinition always starts at element zero of the previous item regardless of the
bounds of that item; this means that the previous item must at least have an
element 0.
•
The data area of a redefinition must be exactly the same as, or entirely within, the
data area of the previous item.