Functions

result

Supported By

Syntax

the result

result ()

Example

if the result is not empty then answer "Try again."

Description

The result function returns the return value of the last command executed. Most built-in commands only set the result if the command was executed unsuccessfully; otherwise, the result is set to empty. A user-defined command can set the result with a return statement. The answer and ask commands use the result to tell the script if the user cancelled a prompt instead of choosing a proper response.

See Also

on, return, ask, answer, sql