ExitCode variable
Contains the application's exit code.  (provided for backward compatibility)UnitSystemCategorybackward compatibility routinesvar ExitCode: Integer;DescriptionExitCode is provided for backwards compatibility only. Use a finalization section instead. NoteThe description of how ExitCode was used follows:The ExitCode variable contains the application's exit code.  An exit procedure can learn the cause of termination by examining ExitCode.  If the program terminates normally, ExitCode is zero.  If the program terminates due to a call to Halt, ExitCode contains the value passed to Halt.  If the program terminates due to a run-time error, ExitCode contains the error code.