Setting DOS errorlevel in C (How?)

Rodrigo Murillo murillo at sigi.Colorado.EDU
Tue Mar 15 01:46:08 AEST 1988


Does someone out there know how to set the DOS errorlevel number
in C?  I want to write a batch file that can branch according to the
value of this number:

     if errorlevel 1 echo Big...
     if errorlevel 2 echo Bigger...
     if errorlevel 3 echo Biggest.

Please send code fragments if possible.
-- 
_______________________________________________________________________________
 Rodrigo Murillo, University of Colorado - Boulder  (303) 761-0410 
 murillo at boulder.colorado.edu | ..{hao|nbires}!boulder!murillo
 ( Machines have less problems.  I'd like to be a machine. -- Andy Worhol )



More information about the Comp.lang.c mailing list