The exit script instruction is used to immediately exit the current script and return to the calling script.
All output argument values returned to the calling script are those assigned at the moment of exiting the script.
Table 8.11. exit script syntax
| Production | Syntax | Links |
|---|---|---|
exit_script_instruction |
"exit" "script"
| the section called “exit script instruction” |
Example 8.8. exit script example
The following command simply appends a suffix to a name. If the suffix is void then the command just returns the name.
service instruction_examples
command append_voidable_suffix
in name type:string end
in suffix type:string voidable:yes end
out result type:string end
script
if suffix =r void then
result = name
exit script // if suffix is void then exit now
end if
result = name & suffix
end script
end command
end service