Message-Id: Date: Sun, 30 Nov 1997 19:54:41 +0000 From: Matthias Paul To: opendos AT delorie DOT com, opendos-support AT delorie DOT com Subject: Re: OpenDOS 7.02b2 bugs Mime-Version: 1.0 Content-Type: text/plain Content-Disposition: inline Precedence: bulk On 97-11-30, Arkady V.Belousov replied: >> 0 - usual run, even if target file not found, or files have different size >[...] >> OS/2 COMP returns the following errorlevel: >> [...] >> 5 - files were not equal >> I have not tested the MS-DOS errorlevels. >> Of course, OpenDOS should at least report errorlevel 5 if file are not equal... > Where you see errorlevel 5 above? Look: >[batchjob deleted] > Try "cmp file1 file2", where files differs by size or by contents and >watch result (superfluous questions and always "compare ok."). :( Yes, that s what I meant, too. I was just reporting the status quo. ;-) The returned errorlevels are not very helpful for batchjob programming, but this could be because of MS-DOS compatiblity (again, I have NOT verified the errorlevels with MS-DOS). BTW: Since COD 7.02 B2 there is now an easier way to retrieve returned errorlevels when using our COMMAND.COM: CMPTEST.BAT: @ ECHO off REM For COD 7.02 B2+ @ CALL comp.com %1 %2 %3 %4 %5 %6 %7 %8 %9 ECHO The returned errorlevel is %ErrorLevel%! REM You can also use %ErrorLvl% for a 3 digit value with leading zeros... %ErrorLevel% and %ErrorLvl% are new system information functions, that can be used just like environment variables. The only difference is, that they always represent the current status, and they are not actually represented in the environment (that is, are invisible from within applications). Also useful might be %/% representing the current SwitChar. Note, that actual environment variables override these internal functions. ------------------------------------------------------------ Matthias Paul eMail: Web: http://www.rhrz.uni-bonn.de/~uzs180/mpdokeng.html