Path: utzoo!mnetor!uunet!husc6!ut-sally!ut-emx!auscso!bigtex!james From: james@bigtex.uucp (James Van Artsdalen) Newsgroups: comp.sys.ibm.pc Subject: Re: More on setting DOS errorlevel Message-ID: <1227@bigtex.uucp> Date: 15 Mar 88 22:36:38 GMT References: <4835@sigi.Colorado.EDU> Distribution: na Organization: F.B.N. Software, Austin TX Lines: 15 In article <4835@sigi.Colorado.EDU>, murillo@sigi.Colorado.EDU (Rodrigo Murillo) writes: > If anybody can tell why this is the way it is I would love to hear it. > Why would (errorlevel 0) test true if the exit is exit(5)??!! The larger the organization, the finer the line between a "feature" and a "design error". For this, send Bill Gates a thank you note. From the Compaq MS-DOS/Version 3 Reference Guide: "If the preceding program returns an exit code that is equal to or greater than the specified NUMBER, the condition is true. If you use the NOT parameter, the preceding error code must be less than NUMBER". So "errorlevel 0" is always true, and "not errorlevel 0" is always false. Enjoy. -- James R. Van Artsdalen ...!uunet!utastro!bigtex!james "Live Free or Die" Home: 512-346-2444 Work: 328-0282; 110 Wild Basin Rd. Ste #230, Austin TX 78746