The EXIT statement is used to halt the execution of a program and return a numeric exit code to the parent process. For compatibility with older versions of the language the EXIT statement may be used without an expression. In this case it is synonymous with the BREAK statement.
Any expression provided must be parenthesized and must evaluate to a numeric result. The numeric result is used as the UNIX or Windows exit code, which is returned to the parent process by the C function exit(). If the expression does not evaluate to a numeric then the program will enter the debugger with a suitable error message.
The expression has been forced to be parenthesized to avoid confusion with the EXIT statement without an expression as much as is possible. The authors apologize for having to provide two different meanings for the same keyword.
See also BREAK.