home *** CD-ROM | disk | FTP | other *** search
- YN is a public domain utility from: MRE Software │ Written by:
- ────────────────────────────────────┐ 150 Jones St. │ Emery D.
- Home of The E88 Text Editor and │ West Point, MS. 39773 │ Wooten Jr.
- The E88 Text Editor machine. │ BBS (601) 494-8078 │
- ────────────────────────────────────┴──────────────────────────┴──────────────
- YN sets the ERRORLEVEL return code value to either 1 or 0
- Y or y => ERRORLEVEL = 0 // N or n => ERRORLEVEL = 1
-
- Place YN in your batch file whenever you require a Y/N answer. It will wait
- for a character to be struck from the keyboard. If the character is Y or y
- the ERRORLEVEL will be set to 0. If the character is N or n then YN will
- return an ERRORLEVEL code of 1. If the character is not Y or y or N or n
- then YN will ignore it and continue to wait until it gets a valid character.
- ----------------------------------------------------------------------------
- Batch file Example:
- ECHO OFF
- :START
- ECHO Do you want to continue this endless madness? (Y/N)
- YN
- IF ERRORLEVEL 1 GOTO END
- GOTO START
- :END
- ECHO Thank you! I was beginning to get tired.
- ----------------------------------------------------------- Enjoy -----------