Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FourFlow Control (continued)

4.12 The ‘exit’ Statement

Overview

The exit statement causes the execution script to stop and return to whatever function called the script. The script exits and returns to its caller, which could be the application or another script.

Syntax/Parameters

Syntax

exit [parameter];

Parameters

parameter

An optional expression that creates a return value for the caller.

Remarks

The exit statement is a little like the return statement except the script call stack is completely unwound and the script will return to the calling program. The script may or may not ‘unload’ depending on the action of the caller.

The data type of parameter should match the caller’s expectation. To the extent practical, the script processor will attempt to match types.

Use caution returning handles if declared as local variables. They will be released and the returned handle value will be invalid.