MAINSAIL Language Manual, Section 47.16

previous   next   top   complete contents   complete index   framed top   this page unframed


47.16. $setExitCode

Figure 47–18. $setExitCode
<macro>     $setExitCode
                        (
LONG BITS bb);

At any time during MAINSAIL execution, $setExitCode(bb) can be used to set the MAINSAIL exit code to bb, where bb is a LONG BITS value. When MAINSAIL subsequently exits, the value of the exit code is passed back to the operating system if it is possible to do so.

Two portable exit codes, $successExitCode and $failureExitCode, are defined for each operating system and can be used to portably return success or failure, respectively. These exit codes are defined according to the convention used by each system to determine whether or not a process terminates normally. Other values passed to $setExitCode have system-dependent meanings; the correspondence between MAINSAIL and OS values is described in the system-dependent MAINSAIL user's guides for those operating systems that support exit codes.

By default, MAINSAIL exits with the code $successExitCode.


previous   next   top   complete contents   complete index   framed top   this page unframed

MAINSAIL Language Manual, Section 47.16