|Note||This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available|
Search an order for the first key matching the specified string, position the record pointer to the corresponding record, and set the Found() flag.
Note: FIND is a compatibility command and is no longer recommended. It is superseded by SEEK. See SEEK for more information.
|<xcKeyValue>||Part or all of the order key of a record to search for. When an expression is specified instead of a literal string, FIND is equivalent to SEEK.|
If SetSoftSeek() is FALSE and FIND does not find a record, the record pointer is positioned to LastRec() + 1, EOF() returns TRUE, and Found() returns FALSE.
If SetSoftSeek() is TRUE and FIND does not find a record, the record pointer is positioned to the record with the next greater key value, and Found() returns FALSE. In this case, EOF() returns TRUE only if there are no keys in the index greater than the search argument.
If the record is found, Found() is set to TRUE and the record pointer is positioned on the found record.
These examples show simple FIND results:
USE sales INDEX branch NEW
? Found(), EOF(), RECNO() // Result: FALSE TRUE 85
? Found(), EOF(), RECNO() // Result: TRUE FALSE 5
? Found(), EOF(), RECNO() // Result: TRUE FALSE 1
EoF(), Found(), RecNo(), SEEK, SET INDEX, SET ORDER, SetSoftSeek()