Einzelnen Beitrag anzeigen
Alt 12.10.2012, 01:45   #138
leecher
Moderator
ISKEY

E r g e b n i s / R e s u l t

Is there a key waiting in the keyboard buffer ?

B e s c h r e i b u n g / D e s c r i p t i o n

This procedure tells the calling program if there is a key waiting
in the keyboard buffer.

This allows an Open Access program to prompt the user for a response and
then, if no key is waiting, run another part of the program. Using the
time a user is thinking for additional processing is the start of
multitasking.

S y n t a x

Code:
boolean = call('ISKEY')
P a r a m e t e r

There are no parameters for this procedure

R e t u r n s

The procedure returns a Boolean or True/False value.

TRUE - there is a key waiting in the buffer
FALSE - there is nothing in the keyboard buffer

B e i s p i e l / E x a m p l e

Code:
attach 'KEYBOARD' 
x = true
put 'Do you want to continue ?'
! as long as the keyboard buffer is empty, this loop will be active
while not call("ISKEY")
   do somethingelse
end while 
! the user has pressed <do:F10> or <undo:Esc> so get the value from the 
! keyboard buffer
get x 
detach 'KEYBOARD'
Q u e r v e r w e i s / C r o s s R e f e r e n c e
GET_CH
GET_CHE
FLUSHBUF
leecher ist offline   Mit Zitat antworten