TACL Reference Manual
Built-In Functions and Variables
HP NonStop TACL Reference Manual—429513-018
9-355
#SETMANY Built-In Function
#SETMANY Built-In Function
Use #SETMANY to distribute the members of a space-separated list into individual
variable levels.
variable-name-list
is a space-separated list of one or more existing variable levels or underscores.
text
is a space-separated list of items (if the entire function call is enclosed in square
brackets, end-of-line characters are treated as spaces). Commas may occur in text
because everything after the first comma is considered to be text. Space and end-
of-line are the only characters considered to be separators in the text.
Result
#SETMANY returns nothing.
Considerations
•
Each item in text is put into the corresponding variable level. If, however, the
corresponding entry in variable-name-list is an underscore character (_)
instead of a variable level name, the text item is discarded.
•
If there are more items in text than there are entries in variable-name-list,
the extra items are ignored. If there are more entries in variable-name-list
than items in text, the unallocated variable levels are cleared.
•
Specified variable levels must already exist; their types remain unchanged.
•
To copy a string to an existing variable level, use the #SETV built-in function.
•
To change the contents of a single variable level or built-in variable, use the #SET
built-in function.
Examples
1. This example illustrates the use of #SETMANY to find out the four parts of a file
name:
[#SETMANY volume subvol file system,
[#FILEINFO /VOLUME,SUBVOL,FILE,SYSTEM/ fname]
]
The SYSTEM option is specified last because it returns nothing if the file name is
in local form and would cause the correspondence between the two lists to be lost
if it did not occur last.
#SETMANY variable-name-list , [ text ]