[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson