[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| CHRSAW |
+---------------------------------+
CHRSAW([<expN>])
-----------------------------------
Determines if a character is present in keyboard buffer.
Return value - Logical
-----------------------------------
This function can be used for a variety of timed activities, like
shutting down an application if a key has not been pressed for a
specified number of seconds. Does not affect the keyboard buffer's
contents.
<expN>
Waits for <expN> seconds for a key to be pressed. If <expN> is
present, the function waits up to <expN> seconds for a key to be
pressed. <expN> may have a fractional part. If <expN> is omitted, the
function returns a value immediately.
+---------------------------------+
| Program Example |
+---------------------------------+
In this example, system will display a window containing input fields
and wait 10 minutes for keyboard input. If no key is pressed, CHRSAW()
returns false and program terminates.
SET TALK OFF
STORE 0 to holdkey
DEFINE WINDOW menter FROM 7,10 to 17,70 PANEL
ACTIVATE WINDOW menter
@ 1,3 SAY 'Customer: ' GET mcustomer DEFAULT SPACE(40)
@ 3,3 SAY 'Address: ' GET maddress DEFAULT SPACE(40)
@ 5,3 SAY 'City: ' GET mcity DEFAULT SPACE(24)
@ 7,3 SAY 'State: ' GET mstate DEFAULT SPACE(2)
@ 7,18 SAY 'Zip: ' GET mzip DEFAULT SPACE(10)
@ 1,14 SAY ''
IF NOT CHRSAW(600)
DEACTIVATE WINDOW menter
CLEAR GETS
CLOSE ALL
CANCEL
ELSE
READ
DEACTIVATE WINDOW menter
ENDIF
-----------------------------------
See Also: INKEY(), READKEY()
-----------------------------------
See Also:
INKEY()
READKEY()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson