home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / getkey.prg < prev    next >
Text File  |  1993-10-14  |  1KB  |  65 lines

  1. /*
  2.  * File......: GETKEY.PRG
  3.  * Author....: Martin Colloby
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Martin Colloby
  7.  * Date......: 18/4/93
  8.  * Revision..: 1.0
  9.  *
  10.  * This is an original work by Martin Colloby and is placed in the public
  11.  * domain.
  12.  *
  13.  * Modification history:
  14.  * ---------------------
  15.  *
  16.  * $Log$
  17.  *
  18.  */
  19.  
  20.  
  21. /*  $DOC$
  22.  *  $FUNCNAME$
  23.  *      GT_GETKEY()
  24.  *  $CATEGORY$
  25.  *      General
  26.  *  $ONELINER$
  27.  *      Wait for the next keypress
  28.  *  $SYNTAX$
  29.  *      GT_GetKey()
  30.  *  $ARGUMENTS$
  31.  *      None
  32.  *  $RETURNS$
  33.  *      The scan code of the key pressed
  34.  *  $DESCRIPTION$
  35.  *      Flushes the keyboard buffer and waits for a key to be pressed
  36.  *  $EXAMPLES$
  37.  *
  38.  *  $SEEALSO$
  39.  *
  40.  *  $INCLUDE$
  41.  *      GT_LIB.CH
  42.  *  $END$
  43.  */
  44.  
  45. *
  46. #include "GT_LIB.ch"
  47.  
  48. FUNCTION GT_GetKey
  49.  
  50. /****************************************************************************
  51.  Purpose - Clear the type-ahead buffer and get the next key pressed
  52.  Returns - Key value
  53.  Author  - Martin Colloby
  54.  Created - 20/5/91
  55. ******************************************************************************
  56.  Parameters - None
  57.  Locals     - None
  58.  Externals  - None
  59. ****************************************************************************/
  60.  
  61. CLEAR TYPEAHEAD
  62.  
  63. RETURN( INKEY( 0 ) )
  64. *
  65.