home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / prog / ks94an.arj / WAITFOR.HDR < prev    next >
Text File  |  1994-04-24  |  1KB  |  54 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _WaitFor( nWKey1, nWKey2, nWKey3, nWKey4, nWKey5, nWKey6 ) --> nKeyCode
  8.  
  9. PARAMETERS:
  10.  
  11. nWKey1 : INKEY() Code of key to wait for
  12. nWKey2 : ""
  13. nWKey3 : ""
  14. nWKey4 : ""
  15. nWKey5 : ""
  16. nWKey6 : ""
  17.  
  18. SHORT:
  19.  
  20. Wait for the user to press any of (up to) 6 predefined keys, returning key.
  21.  
  22. DESCRIPTION:
  23.  
  24. _WaitKey() pauses execution of a program and waits for a key that matches
  25. one of the keys specified in the formal argument list.
  26.  
  27. _WaitFor() accepts up to six numeric arguments that represent Clipper
  28. INKEY() codes of keys to "wait for" and returns the INKEY() value of the
  29. key that was pressed.
  30.  
  31. NOTE:
  32.  
  33. _WaitFor() is NOT a wait state.
  34.  
  35. EXAMPLE:
  36.  
  37. t = _WaitFor(27,13,-9)
  38.  
  39. Result: Program pauses until ESC, ENTER or F10 is pressed, whereupon the
  40. value of the key that was pressed is returned as return value.
  41.  
  42. Clipper Preprocessor key labels can be used to make it clear which keys
  43. are being "waited" upon.
  44.  
  45. #include "inkey.ch"
  46.  
  47. t = _WaitFor(K_ESC, K_ENTER, K_F10)
  48.  
  49. Result: user can hit keys until blue in the face, but until either Esc,
  50. ENTER, or F10 are pressed, nothing else happens.  The pressed key's INKEY()
  51. value is returned.
  52.  
  53. ******************************************************************************/
  54.