The EGL exit statement leaves the specified block, which by default is the block that immediately contains the exit statement.
An error occurs if the exit statement is not inside a case statement that begins in the same function.
An error occurs if the exit statement is not inside a for statement that begins in the same function.
An error occurs if the exit statement is not inside a forEach statement that begins in the same function.
An error occurs if the exit statement is not inside an if statement that begins in the same function.
If the program ends with a terminating exit statement that includes a return code other than sysVar.returnCode, the specified value is used in place of any value that may be in sysVar.returnCode.
For other details on return values, see sysVar.returnCode.
For details, see sysVar.returnCode.
A statement of the form exit stack removes all references to the intermediate functions in the runtime stack, which is a list of functions; specifically, the current function plus the series of functions whose running made possible the running of the current function.
The main function may have invoked a function (now in the stack), and the invocation may have included a parameter that had the modifier out or inOut. In those cases, the exit statement of the form exit stack makes the value of the parameters available to the main function.
If you do not specify a label (as described later), processing continues at the statement after the most recently run function invocation in the main function. If you specify a label, processing continues at the statement that follows the label in the main function. The label may precede or follow the most recently run function invocation in the main function.
If you specify an exit statement of the form exit stack in the main function, the next statement is processed, even if you specify a label. For details on how to go to a specified label in the current function, see goTo.
When displayed at the location where processing continues, the label is followed by colon. For details on valid characters for the label, see Naming conventions.
Related reference
goTo
Naming conventions
returnCode