Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Exit status
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===DOS=== In DOS terminology, an '''errorlevel''' is an [[integer]] exit [[code]] returned by an [[executable|executable program]] or [[subroutine]]. Errorlevels typically range from 0 to 255.<ref name="Paul_1997_BATTIPS"/><ref name="FD_2003_Errorlevel"/><ref name="Paul_1997_NWDOSTIP"/><ref name="Allen_2005"/> In [[DOS]] there are only 256 error codes available, but [[DR DOS 6.0]] and higher support 16-bit error codes at least in [[CONFIG.SYS]].<ref name="Paul_1997_NWDOSTIP"/> With [[4DOS]] and DR-DOS [[COMMAND.COM]], exit codes (in batchjobs) can be set by [[EXIT (DOS command)|EXIT ''n'']]<!-- MS-DOS/PC DOS COMMAND.COM does not support the optional parameter, just EXIT without any arguments --><ref name="Paul_1997_NWDOSTIP"/> and (in CONFIG.SYS) through [[ERROR (CONFIG.SYS directive)|ERROR=''n'']]<!-- and a number of other more specialized directives -->.<ref name="Paul_1997_NWDOSTIP"/> Exit statuses are often captured by [[batch file|batch programs]] through [[IF ERRORLEVEL (DOS command)|IF ERRORLEVEL]] commands.<ref name="Paul_1997_BATTIPS"/><ref name="Paul_1997_NWDOSTIP"/> [[Multiuser DOS]] supports a reserved <!-- true -->[[environment variable]] [[%ERRORLVL%]] which gets automatically updated on return from applications. COMMAND.COM under [[DR-DOS 7.02]] and higher supports a similar [[pseudo-environment variable]] %ERRORLVL% as well as [[%ERRORLEVEL%]].<!-- MS-DOS and PC DOS do not, only Windows does! --> In CONFIG.SYS, DR DOS 6.0 and higher supports [[ONERROR (CONFIG.SYS directive)|ONERROR]] to test the load status and return code of device drivers and the exit code of programs.<ref name="Paul_1997_NWDOSTIP"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)