Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>lastkey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
LASTKEY()


Syntax:     LASTKEY()

Purpose:    To determine the last key fetched from the keyboard buffer.

Returns:    An integer value.

            LASTKEY() returns a number from -39 to 386 identifying the
            ASCII value of the last key fetched.

Usage:      LASTKEY() is useful in a number of instances:

            .  To determine the key used to terminate a READ.

            .  To determine the key used to exit the current GET when
               within a user-defined function executed from a VALID
               clause.

            .  To identify the exception key pressed in the user
               function of ACHOICE(), DBEDIT(), or MEMOEDIT().

            If you need to know whether the user has changed the
            contents of any GETs, use UPDATED().  If you need to know
            the key pending in the keyboard buffer, use NEXTKEY().

Library:    CLIPPER.LIB


----------------------------------- Example --------------------------------

   USE Customer
   M->bal = Bal
   @ 10, 10 SAY "Current Balance"
      GET M->bal
   READ
   *
   IF LASTKEY() <> 27
      REPLACE Bal WITH M->bal
   ENDIF


See Also: KEYBOARD CHR() INKEY() NEXTKEY() ReadKey()

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