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 5.2 . The Guide To CA-Clippe - <b>updated()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 UPDATED()
 Determine whether a GET changed during a READ
------------------------------------------------------------------------------
 Syntax

     UPDATED() --> lChange

 Returns

     UPDATED() returns true (.T.) if data in a GET is added or changed;
     otherwise, it returns false (.F.).

 Description

     UPDATED() determines whether characters were successfully entered into a
     GET from the keyboard during the most current READ.  Each time READ
     executes, UPDATED() is set to false (.F.).  Then, any change to a GET
     entered from the keyboard sets UPDATED() to true (.T.) after the user
     successfully exits the GET.  If the user presses Esc before exiting the
     first GET edited, UPDATED() remains false (.F.).  Once UPDATED() is set
     to true (.T.), it retains this value until the next READ is executed.

     Within a SET KEY or VALID procedure, you can change the current GET
     variable using the KEYBOARD command or by assigning a new value with one
     of the many assignment operators.  Changing the variable with KEYBOARD
     is the same as if the user had entered the change directly from the
     keyboard, and UPDATED() is set accordingly.  However, since UPDATED()
     reflects only those changes made from the keyboard, an assignment to the
     GET variable does not affect UPDATED().

 Examples

     .  This example assigns field values from Customer.dbf to
        variables and edits them.  If the user changes any of the values, the
        field variables for the current record are updated with the new
        values:

        USE Customer NEW
        CLEAR
        MEMVAR->Customer = Customer->Customer
        MEMVAR->Address = Customer->Address
        @ 1, 1 SAY "Name:" GET MEMVAR->Customer
        @ 2, 1 SAY "Address:" GET MEMVAR->Address
        READ
        //
        IF UPDATED()
           Customer->Customer := MEMVAR->Customer
           Customer->Address := MEMVAR->Address
        ENDIF

 Files:  Library is CLIPPER.LIB.

See Also: @...GET READ SET KEY

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