home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HomeWare 14
/
HOMEWARE14.bin
/
prog
/
ks94an.arj
/
WAITFOR.HDR
< prev
next >
Wrap
Text File
|
1994-04-24
|
1KB
|
54 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_WaitFor( nWKey1, nWKey2, nWKey3, nWKey4, nWKey5, nWKey6 ) --> nKeyCode
PARAMETERS:
nWKey1 : INKEY() Code of key to wait for
nWKey2 : ""
nWKey3 : ""
nWKey4 : ""
nWKey5 : ""
nWKey6 : ""
SHORT:
Wait for the user to press any of (up to) 6 predefined keys, returning key.
DESCRIPTION:
_WaitKey() pauses execution of a program and waits for a key that matches
one of the keys specified in the formal argument list.
_WaitFor() accepts up to six numeric arguments that represent Clipper
INKEY() codes of keys to "wait for" and returns the INKEY() value of the
key that was pressed.
NOTE:
_WaitFor() is NOT a wait state.
EXAMPLE:
t = _WaitFor(27,13,-9)
Result: Program pauses until ESC, ENTER or F10 is pressed, whereupon the
value of the key that was pressed is returned as return value.
Clipper Preprocessor key labels can be used to make it clear which keys
are being "waited" upon.
#include "inkey.ch"
t = _WaitFor(K_ESC, K_ENTER, K_F10)
Result: user can hit keys until blue in the face, but until either Esc,
ENTER, or F10 are pressed, nothing else happens. The pressed key's INKEY()
value is returned.
******************************************************************************/