1. reading errorlevel value...
- Posted by Lee woo seob <wslee at HHI.CO.KR> Sep 11, 1997
- 576 views
Hi all! Is there anyone to know how to get the errorlevel value returned by a program which is excuted by the "system()" command of Euphoria? Thanks much in advance! from Lee, woo seob.
2. Re: reading errorlevel value...
- Posted by Craig Gilbert <cgilbert at CENNET.MC.PEACHNET.EDU> Sep 11, 1997
- 580 views
Lee woo seob wrote: >Is there anyone to know how to get the errorlevel value returned by >a program which is excuted by the "system()" command of Euphoria? Hey, for once I know an answer! I remember this from reading the old logs and here it is: Unless Robert Craig has changed something since then, the Watcom routine Euphoria calls (when you call system() ) does not provide any meaningful return value. Or, nope, can't do it. Of course, somebody may have figured out how to get around that by now . . . Craig
3. Re: reading errorlevel value...
- Posted by Ralf Nieuwenhuijsen <nieuwen at XS4ALL.NL> Sep 11, 1997
- 553 views
Lee woo seob wrote: > Is there anyone to know how to get the errorlevel value returned by > a program which is excuted by the "system()" command of Euphoria? MS-DOS has a couple of variables that any program can access call environment variables You can access them (from library.doc) like this: ------------------------------------<getenv>---------------------------------- Syntax: x = getenv(s) Description: Return the value of a DOS environment variable. If the variable is undefined return -1. Example: e = getenv("EUDIR") -- e will be "C:\EUPHORIA" -- or perhaps D:, E: etc. Comments: Because either a sequence or an atom (-1) might be returned, you should probably assign the result to a variable declared as object. See Also: command_line ------------------------------------<end of getenv>--------------------------- The variable you want to call is 'ERRORLEVEL' So to acces the errorlevel returned by an application do something like: e = getenv("ERRORLEVEL") And e will hold the ascII representation of the errorlevel value. (I think) I'm am not 100% sure about this, but in a batch file (.bat) you use the same method to acces the errorlevel as you use with any other environment variable. Ralf Nieuwenhuijsen nieuwen at xs4all.nl