$result - Various command return values
$result returnValue
$result is used to return the results of several commands:
buffer-info(2) $result is set to the same output string as printed to the message-line by this command.
$result is used to give and return information to osd item commands, information depends on the type of osd item.
$result is used to return the button pressed by the user.
$result is set to the exit status of the system call. The combination of shell-command calls and return value checking can be used in a variety of ways, for example, to test the existence of a file:
set-variable %filename @ml"Enter file name" shell-command &cat "test -f " %filename !if &equ $result 0 ml-write "file exists" !else ml-write "file does not exists" !endif
$result is set to the current status of the region when an argument of 0 is given to show-region.
$result is used to return information on the current word, the information depends on the argument given to spell.
$result is set to the absolute path of the $file-names query directory when the variable is set.
For more information see the help pages on referenced commands and variables.
The current value of $result is lost on the next command call which uses it. As a call to create-callback(2) can cause the execution of a macro to interrupt another which is waiting for user input, the value of $result should be copied before getting user input.
buffer-info(2), change-font(2), count-words(2), find-registry(2), get-registry(2), mark-registry(2), osd(2), shell-command(2), show-region(2), spell(2), $file-names(5). create-callback(2), $status(5).
(c) Copyright JASSPA 1999
Last Modified: 1999/06/02
Generated On: 1999/12/01