TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-415
#VARIABLEINFO Built-In Function
Table 9-16 lists the result for each of these options depending on the type of argument
given to #VARIABLEINFO.
(a) Number of text lines in the variable level.
(b) Number of characters in the variable level, with each line end counting as a character.
(c) Number of data bytes required to hold the entire structure.
(d) Number of data bytes required to hold one occurrence of the substructure or simple item.
(e) Number of occurrences of the substructure or simple item.
(f) Number of bytes before the first byte of data of the first occurrence of the specified substructure or simple item,
regardless of its declared bounds.
(g) STRUCT for a substructure, or the data type for a simple item. (See Section 3, “Variables,” for a list of data
types.)
Considerations
The information is returned in the order in which the options are given.
If the specified variable level does not exist, all options except EXISTENCE return
nothing.
When you apply the LINES or OCCURS option to a DELTA, MACRO, ROUTINE,
or TEXT variable level, the entire variable level must be read to compute the
specified values.
OCCURS and LEN ignore bounds specifications when operating with a STRUCT
item.
Each logical line within a variable contains an internal end-of-line character that
counts as one byte. For variables that contain TACL statements, each square
bracket ([,]), vertical bar (|), or tilde-space combination (~_) uses two bytes,
including unprintable characters that are subject to change from one TACL RVU to
another. Other characters use one byte.
Table 9-16. #VARIABLEINFO Type-Dependent Results
Variable Type LEN LINES OCCURS OFFSET TYPE
Alias 0000ALIAS
Delta 1 (a) (b) 0 DELTA
Directory0000DIRECTOR
Y
Macro 1 (a) (b) 0 MACRO
Routine 1 (a) (b) 0 ROUTINE
Structure(c)110STRUCT
Structure Item (d) 1 (e) (f) (g)
Text 1 (a) (b) 0 TEXT