TACL Reference Manual
Variables
HP NonStop TACL Reference Manual—429513-018
4-12
STRUCT Variables
The VALUE option of the #ARGUMENT function returns the fully qualified form of the
file-name argument.
STRUCT Variables
A STRUCT variable, or structure, is a special-purpose variable that contains a set of
named and typed data items that you can access individually or as a group. Use
STRUCTs to access the Subsystem Programmatic Interface (SPI), the Event
Management Service (EMS), or if you need to store binary data such as 6530 terminal
escape sequences.
TACL STRUCT variables support a wide range of data types. STRUCT variables can
contain simple data items, arrays, and other structures (called substructures).
Structures usually contain related data items. For example, a structure might contain a
process name, the primary CPU,PIN of the process, and its backup CPU,PIN.
Elements of STRUCT Variables
STRUCT variables have these elements:
•
A name
•
A body that can contain:
°
Single-value data items
°
Arrays
°
Substructures
To declare a STRUCT, use #DEF or ?SECTION to declare a structure body and all
items and substructures associated with the body. For each STRUCT, TACL stores
two types of information: access information and the actual data. (If you declare a
structure using LIKE, the STRUCT contains a pointer to a similar STRUCT that
contains access information.) You store and retrieve STRUCT data as text; TACL
stores the data in an internal format and performs translation to and from the internal
format as needed. You can redefine a STRUCT and specify new access information
for your data.
A structure in TACL can contain up to 5000 bytes of data.
Limitations on the Use of STRUCT Variables
Not all TACL commands and built-in functions accept STRUCT variables as
arguments. The use of a STRUCT variable is limited to:
•
Describing the STRUCT using #VARIABLEINFO (programmatic) or VARINFO
(interactive)
•
Invoking the STRUCT with the use of square brackets, in which case TACL returns
the elements of the STRUCT as a space-separated list