ID: Q114755
The information in this article applies to:
The VALID clause of a GET is executed when no changes have been made to the field or memory variable.
In dBASE IV, the VALID clause of a GET is executed only when the contents of the GET field or memory variable have been changed. The VALID clause is not executed when the cursor is moved out of a GET field or memory variable and no changes were made to the contents of that field or memory variable. In FoxPro, the VALID clause of a GET is always executed when the cursor is moved out of the GET. dBASE IV provides a REQUIRED clause for the VALID clause.
In dBASE, this optional clause is used to force a VALID to be executed when the cursor is moved out of a field or memory variable even if no changes were made to the field or memory variable. The REQUIRED clause is ignored in FoxPro.
This is a known incompatibility for which a workaround has not been established.
Execute the following code in dBASE IV and FoxPro:
test1 = SPACE(10)
test2 = SPACE(10)
@ 10,10 GET test1 VALID myfunc()
@ 11,10 GET test2
READ
FUNCTION myfunc
? "In Valid"
RETURN .T.
When the code is executed, the cursor will be in test1. Press the ENTER key
without making any changes to the memory variable. In dBASE IV, the VALID
clause will not be executed. In FoxPro, it will be executed.
Additional reference words: FoxMac FoxDos FoxWin 2.60 differences KBCategory: kbprg kbprb KBSubcategory: FxinteropDbase
Last Reviewed: June 28, 1995