|Navigation: Language Reference > 13 - Built-in Functions >====== HALT (exit program) ======|
|HALT||Immediately terminates the program.|
|errorlevel||A positive integer constant or variable which is the exit code to pass to DOS, setting the DOS ERRORLEVEL. If omitted, the default is zero.|
|message||A string constant or variable which is typed on the screen after program termination.|
The HALT statement immediately returns to the operating system, setting the errorlevel and optionally displaying a message after the program terminates. All standard runtime library procedures for application closedown are performed (all open windows and files are closed and flushed and all allocated memory is returned to the operating system) without executing any further Clarion code in the application.
HALT should not be used in multi-DLL applications, and should only be used as a debugging technique.
IF Password <;> 'Pay$MeMoRe'
HALT(0,'Incorrect Password entered.')