oem.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CHOICE--Note
Examples  Syntax
────────────────────────────────────────────────────────────────────────────
 
                                CHOICE──Note
 
ERRORLEVEL parameters
 
The first key you assign returns a value of 1, the second a value of 2, the
third a value of 3, and so on. If the user presses a key that is not among
the keys you assigned, CHOICE sounds a warning beep (that is, it sends a
BEL, or 07h, character to the console).
 
If CHOICE detects an error condition, it returns an ERRORLEVEL value of 255.
If the user presses CTRL+BREAK or CTRL+C, CHOICE returns an ERRORLEVEL value
of 0.
 
When you use ERRORLEVEL parameters in a batch program, list them in
decreasing order.
 
                                      ♦