$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 takes the form of a regex.
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 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12