Difference between revisions of "SET INKEYDELAY"
From Recital Documentation Wiki
Barrymavin (Talk | contribs) (→Example) |
Helengeorge (Talk | contribs) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Enable or disable delays between checks for keys pressed in the INKEY() function | Enable or disable delays between checks for keys pressed in the INKEY() function | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[@...MENU]], [[ | + | [[@...MENU]], [[ASCII Chart]], [[DO WHILE]], [[INKEY()]], [[MENU]], [[MESSAGE]], [[SET MESSAGE]], [[SET PCKEYS]], [[WAIT]] |
Line 26: | Line 19: | ||
set inkeydelay on | set inkeydelay on | ||
do while inkey()=0 | do while inkey()=0 | ||
− | // | + | // execute some commands until a key is pressed |
enddo</code> | enddo</code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|INKEYDELAY]] | [[Category:Set_Commands|INKEYDELAY]] | ||
+ | [[Category:Keyboard Events]] | ||
+ | [[Category:Keyboard Events Set Commands]] |
Latest revision as of 16:02, 23 November 2009
Purpose
Enable or disable delays between checks for keys pressed in the INKEY() function
Syntax
SET INKEYDELAY ON | OFF | (<expL>)
See Also
@...MENU, ASCII Chart, DO WHILE, INKEY(), MENU, MESSAGE, SET MESSAGE, SET PCKEYS, WAIT
Description
SET INKEYDELAY ON controls the wait period for the INKEY() function. The INKEY() function returns a zero if no key has been pressed, or the ASCII value of the key which has been pressed. When INKEYDELAY is ON, a check is made once a second for a keystroke. If INKEYDELAY is OFF, the check is made continually. The default setting for INKEYDELAY is OFF. If INKEYDELAY is set OFF, then DO WHILE loops that wait for user input with the INKEY() function may be very CPU intensive.
Example
set inkeydelay on do while inkey()=0 // execute some commands until a key is pressed enddo
Products
Recital