Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>inkeytrap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 INKEYTRAP()
 Behaves like INKEY() with support for key traps
------------------------------------------------------------------------------
 Syntax

     INKEYTRAP(<nDelay>) --> nKeyCode

 Argument

     <nDelay>  Designates the delay time in seconds.

 Returns

     The function returns the same key code as INKEY().

 Description

     This function operates in essentially the same way as INKEY().  It
     supports the same time delays and returns the same key codes as values.
     The most significant difference to INKEY() is that all key traps defined
     using SET KEY <Key> TO <Procedure> are supported.  This function saves
     the programmer time; for example, the programmer does not have to
     develop extensive CASE constructs after each INKEY().

 Note

     .  After the trap procedure ends, the <nDelay> time is reset.

 Example

     SET KEY 28 TO HELP               // F1 Key
     nVar  :=  INKEYTRAP(10)          // 10-second delay
     RETURN

     PROCEDURE Help(a, b, c)          // Parameter c is always
                                      // a null string
     ("")

     * Program code desired

     RETURN


See Also: SAVESETKEY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson