home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / basic / library / qb_pds / quicksub / num.asc < prev    next >
Encoding:
Text File  |  1986-06-12  |  1.0 KB  |  44 lines

  1. ' NUM.ASC -- MSDOS QuickBASIC test of the NUMLOCK subroutine
  2. '             by David L. Poskie   Madison, WI
  3.  
  4.     LOCATE 8 , 23
  5.     PRINT "NUMLOCK subroutines demonstration"
  6.     PRINT
  7.     LOCATE 10 , 22
  8.     PRINT "Please DON'T press the NUMLOCK key !"
  9.     GOSUB GETKEY.PRESS
  10.     CLS
  11.     GOSUB NUMLOCK.TEST
  12.     LOCATE 12,30
  13.     PRINT "NUMLOCK is now ";
  14.     IF NUMLOCK                            _
  15.        THEN PRINT "ON"                        _
  16.        ELSE PRINT "OFF"                        _
  17.     
  18.     GOSUB GETKEY.PRESS
  19.     CLS
  20.     LOCATE 12 , 1
  21.     LINE INPUT "Please enter some of the numeric keypad keys "; Q$
  22.     PRINT
  23.  
  24.     IF NUMLOCK                            _
  25.        THEN GOSUB NUMLOCK.OFF                    _
  26.        ELSE GOSUB NUMLOCK.ON
  27.  
  28.     LINE INPUT "Now enter some more numeric keypad keys "; Q$
  29.     PRINT "This program has toggled your NUMLOCK key"
  30.  
  31.      IF NUMLOCK                            _
  32.        THEN GOSUB NUMLOCK.ON                    _
  33.        ELSE GOSUB NUMLOCK.OFF
  34.  
  35.     PRINT
  36.     PRINT "NUMLOCK has been restored to its original setting"
  37.     PRINT "End of demonstration "
  38.     END
  39.  
  40.     REM    $INCLUDE: 'NUMLOCK.SUB'
  41.     REM    $INCLUDE: 'GETKEY.SUB'
  42.  
  43. '>>>>> Physical EOF for NUM.ASC
  44.