$status - Macro command execution status
$status boolean
boolean TRUE (1) | FALSE (0)
$status contains the return status of the last command executed (TRUE or FALSE). $status is generally used with the !force directives in macros.
This variable can not be set, any attempt to set it will result in an error.
The following example shows how the variable is used within a macro construct, it converts all tab characters to their SPACE equivalent.
; ; tabs-to-spaces. ; Convert all of the tabs to spaces. define-macro tabs-to-spaces ; Remember line set-variable #l0 $window-line beginning-of-buffer !force search-forward "\t" !while $status set-variable #l1 $window-wcol backward-delete-char &sub #l1 $window-wcol insert-space !force search-forward "\t" !done goto-line #l0 screen-update ml-write "[Converted tabs]" !emacro
In this case $status monitors the search-forward command which is searching for a tab character. The command returns a status value of TRUE if a tab is found, otherwise FALSE.
The !force statement prevents the macro from terminating when a FALSE condition is detected, if omitted the macro would terminate with an error as soon as the FALSE status is encountered. The definition of tabs-to-spaces(3) can be found in format.emf.
(c) Copyright JASSPA 1999
Last Modified: 1998/09/03
Generated On: 1999/12/01