[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SWPERRLEV()                   Get child process return code
------------------------------------------------------------------------------

 Function : Get child process return code

 Syntax   : niValue = SWPERRLEV()

 Return   : Child program return code

 This function returns the DOS exit code of the child process. The exit code
 returned is the exit code of the last process which terminated prior to the
 command interpreter returning to the swap kernel, the value of which can be
 confirmed by running the program from a DOS batch file and testing for the
 ERRORLEVEL returned by the program. In the case that the command interpreter
 was the only process executed, the return code will be that of the command
 interpreter.

 Example:

    * Attempt to swap out, compile and link a program
    SWPRUNCMD("Compile myprog -m",0,"","")
    IF SWPERRLEV() <> 0 && compile failed
       ? "Compile failed..."
    ELSE
       SWPRUNCMD("BLINKER @LINK.LNK",0,"","")
    ENDIF

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson