>>-EXIT--+------------+--;------------------------------------->< '-expression-'
EXIT leaves a program unconditionally. Optionally EXIT returns a character string to the caller. The program is stopped immediately, even if an internal routine is currently being run. If no internal routine is active, RETURN (see page Purpose) and EXIT are identical in their effect on the program that is being run.
If you specify expression, it is evaluated and the string resulting from the evaluation is passed back to the caller when the program stops.
Example:
j=3
Exit j*4
/* Would exit with the string '12' */
If you do not specify expression, no data is passed back to the caller. If the program was called as an external function, this is detected as an error--either immediately (if RETURN was used), or on return to the caller (if EXIT was used).
"Running off the end" of the program is always equivalent to the instruction EXIT, in that it stops the whole program and returns no result string.