$result - Various command return values
$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.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2005/06/09
Generated On: 2006/10/07