xHarbour Reference Documentation > Command Reference |
Terminates program execution unconditionally.
QUIT
The QUIT command terminates program execution unconditionally. Before control goes back to the operating system, all files are closed and all EXIT PROCEDURES are executed, unless a runtime error occurs during program shutdown. In this case, the ErrorLevel() function is set to 1 which is the applications's return code to the operating system.
See also: | BEGIN SEQUENCE, Break(), ErrorLevel(), EXIT PROCEDURE, RETURN, TRY...CATCH |
Category: | Memory commands |
Source: | vm\initexit.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows a typical usage of the QUIT command for a // command line utility that relies on a command line parameter // to work properly PROCEDURE Main( cFileName ) CLS IF Empty( cFileName ) .OR. ! File( cFileName ) ? "Usage myApp.exe <fileName>" QUIT ENDIF <file processing> RETURN
http://www.xHarbour.com