Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!b.gp.cs.cmu.edu!Ralf.Brown@B.GP.CS.CMU.EDU From: Ralf.Brown@B.GP.CS.CMU.EDU Newsgroups: comp.sys.ibm.pc Subject: Re: Can batch files return value to C program? Message-ID: <26038d8a@ralf> Date: 18 Mar 90 12:30:50 GMT Sender: ralf@b.gp.cs.cmu.edu Organization: Carnegie Mellon University School of Computer Science Lines: 16 In-Reply-To: <26029AB4.25754@maccs.dcss.mcmaster.ca> In article <26029AB4.25754@maccs.dcss.mcmaster.ca>, cs4g6ag@maccs.dcss.mcmaster.ca (Stephen M. Dunn) wrote: } Please note that a batch file can not return an errorlevel at all. }Only .COM and .EXE programs return errorlevels, and to get their return }codes they can not be executed using the system () call, since that }invokes COMMAND.COM first and COMMAND.COM doesn't pass back the errorlevel }of any program it spawns. Yet another case in which 4DOS does things the way COMMAND *should* have done them. 4DOS properly passes back the errorlevel of a program started with /C. -- UUCP: {ucbvax,harvard}!cs.cmu.edu!ralf -=- 412-268-3053 (school) -=- FAX: ask ARPA: ralf@cs.cmu.edu BIT: ralf%cs.cmu.edu@CMUCCVMA FIDO: Ralf Brown 1:129/46 "How to Prove It" by Dana Angluin Disclaimer? I claimed something? 16. proof by cosmology: The negation of the proposition is unimaginable or meaningless. Popular for proofs of the existence of God.