home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / batch / library / batutl2 / getdigit.doc < prev    next >
Text File  |  1983-12-13  |  2KB  |  69 lines

  1.        This program accepts a prompt from the command line and accepts
  2.        a one digit response to that prompt.  On exit, the DOS ERRORLEVEL
  3.        is set to the digit.  Non-numeric keys are ignored and <Ctrl><Break>
  4.        will not exit.
  5.  
  6.        This program requires DOS 2.0.
  7.  
  8.        Usage:
  9.          GETDIGIT prompt
  10.        where "prompt" is the message to displayed to the user.
  11.  
  12.        Example batch file usage:
  13.       echo off
  14.       :menu
  15.       cls
  16.       echo ---IBM PC Menu--
  17.       echo 1 - Run Wordstar
  18.       echo 2 - Run Dbase II
  19.       echo 3 - Exit to  DOS
  20.       GETDIGIT Please enter an option number:
  21.       if errorlevel 4 goto menu
  22.       if errorlevel 3 goto end
  23.       if errorlevel 2 goto dbase
  24.       if errorlevel 1 goto wordstar
  25.       :if we get here nothing matched -- try again
  26.       goto menu
  27.       :wordstar
  28.       cls
  29.       echo We would run WORDSTAR here.
  30.       pause
  31.       goto menu
  32.       :dbase
  33.       cls
  34.       echo We would run DBASE here.
  35.       pause
  36.       goto menu
  37.       :end
  38.       cls
  39.       echo on
  40.  
  41.        Copyright (C) 1983  Tony Alan Rhea
  42.        This program may be copied and distributed for personal use
  43.        but not for profit provided this notice is included.  Author makes
  44.        no warranty, expressed or implied, as to the correct nature and
  45.        operation of this software.
  46.  
  47.  
  48.        You may make and distribute as many copies of this program as you wish
  49.        for your PERSONAL use only ( NOT for business purposes, please! ).
  50.        Feel free to modify, mutilate, or adulterate this program.  If you come
  51.        up with an bug or improvement, please let me know by writing me at this
  52.        address:
  53.            Tony A. Rhea
  54.            1030 Ivy Lane
  55.            Cary, NC  27511
  56.        If you do modify it, please give me credit in the program.  This helps
  57.        to preserve my ego and increase my fame (but, unfortunately, NOT my
  58.        financial status).  Also, I would appreciate a copy of the modified
  59.        version, preferably on disk (I'll be happy to return your diskette).
  60.  
  61.        If you like this program ( or HATE it ), please let me know.  Drop me
  62.        a line at the address given above.
  63.  
  64.        This program has been submitted for publication in PC-WORLD magazine.
  65.  
  66.  
  67.      Revision history:
  68.         rev 1.0  10/26/83                  { original release }
  69.