Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - __exit_status child process exit code http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __exit_status       Child process exit code
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   int __exit_status

 Default
   0 (no error).

 Description
   The __exit_status system variable contains the error level set by a
   child process called by the run command or the exec() function.

   The value contained in __exit_status reflects the return value of the
   program which is directly launched from Force. When the run command
   implicitly invokes the DOS command processor for executing an other
   application, then __exit_status refers to the return value of command.com,
   but not the program passed as the parameter to the run command. The run
   command invokes DOS if the called application is not present in the
   current directory, and if redirection is used.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc Test_exit_status
   ? __exit_status   // prints 0
   run "replace.exe" // DOS command that requires parameter
   ? __exit_status   // prints 11
   run "sys.com"     // DOS command that requires parameter
   ? __exit_status   // prints 1
   endproc

   proc main
   Test_exit_status()
   endproc

See Also: exec() run

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson