$mode-names - Filtered mode name list
$mode-names ModeName
$mode-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 $mode-names returns the name of the next mode which matches the filter until no more modes are found, in which case an empty string is returned.
The following example prints out the name of all modes to the massage line one at a time. Note that &set(4) is used on the !while(4) statement to avoid evaluating $mode-names twice per loop.
set-variable $mode-names "*" !while ¬ &seq &set #l0 $mode-names "" 100 ml-write &cat "mode: " #l0 !done
(c) Copyright JASSPA 1999
Last Modified: 1998/09/03
Generated On: 1999/12/01