TACL Reference Manual
Variables
HP NonStop TACL Reference Manual—429513-018
4-25
Setting or Altering Structured Data
3. In this substructure redefinition, both substructures (“b” and “c”) have the same
alignment as required. In this case, both begin on an odd-byte boundary:
[#DEF a STRUCT
BEGIN
CHAR xx;
STRUCT b;
BEGIN
CHAR yy;
END;
STRUCT c REDEFINES b;
BEGIN
CHAR zz;
END;
END;
]
4. This example redefines the format of a substructure record:
[#DEF name^record STRUCT
BEGIN
STRUCT whole^name;
BEGIN
CHAR first^name (0:10);
CHAR middle^name (0:10);
CHAR last^name (0:15);
END;
STRUCT initials REDEFINES whole^name;
BEGIN
CHAR first^initial;
FILLER 10;
CHAR middle^initial;
FILLER 10;
CHAR last^initial;
FILLER 15;
END;
END;
]
Setting or Altering Structured Data
To initialize data in a STRUCT, use #DEF or #SET. To change values in the STRUCT,
use #SET.
When storing data in a structure item, you must enter it in a representation appropriate
for the type of that item:
Definition Redefinition
xx yy xx zz