$variable-names - Filtered variable name list
$variable-names VariableName
$variable-names must first be initialized to the required filter string, if the variable is evaluated before it is initialized the value will be set to "ABORT" and the command will fail.
The filter string can contain wild-card characters compatible with most file systems, namely:-
?
[abc]
[a-d]
[^abc]
*
Note that these are not the same characters used by exact(2m) mode.
Once initialized, evaluating $variable-names returns the name of the next variable which matches the filter until no more variables are found, in which case an empty string is returned.
The following example prints out the name of all variables to the massage line one at a time. Note that &set(4) is used on the !while(4) statement to avoid evaluating $variable-names twice per loop.
set-variable $variable-names "*" !while ¬ &seq &set #l0 $variable-names "" 100 ml-write &cat "variable: " #l0 !done
The list of variables is evaluated when the variable is initialized, variables defined after the initialization will not be included in the list. The list can contain the current buffer's buffer variables (See Variables(4) for more information on the different types of variables).
Using unset-variable(2) to delete a variable which are in the list, before it has be evaluated, will have undefined effects.
(c) Copyright JASSPA 1999
Last Modified: 1998/09/03
Generated On: 1999/12/01