How to return exit code such as exit() function in C/C++ ?
CK1820 Created at Jul 02, 2009 08:12:08 Updated at Jan 15, 2024 02:47:55
92 0 0 0
You can return exit code in delphi by following method:
var
i : Integer;
begin
// Set up an error address so that halt shows a termination dialog
ErrorAddr := Addr(i);
// Set the program exit code
ExitCode := 8;
end;
As you can see above, you can set exit code by ExitCode variable. That is global variable indicating exit code.