[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
FIND
FIND searches an indexed database file for the first record with an
index key that matches the specified character string or number. FIND
conducts a very rapid record search.
Syntax
FIND <character string>/(<expC>)
Argument
<character string> is all or part of the index key of a record you are
searching for. if an expression (<expC>) is specified instead of a
literal character string, FIND operates the same as SEEK.
Usage
FIND searches the controlling index starting with the first key and
proceeds until a match is found or there is a key value greater than
the search argument. If there is a match, the record pointer is
positioned to the record number found in the index. If SOFTSEEK is OFF
(the default) and FIND does not find a record, the record pointer is
positioned to LASTREC() + 1, EOF() returns true (.T.), and FOUND()
returns false (.F.). If SOFTSEEK is ON, the record pointer is
positioned to the record with the first key value greater than the
search argument and FOUND() returns false (.F.). In this case, EOF()
only returns true (.T.) if there are no keys in the index greater than
the search argument.
Leading blanks: If a literal search argument has leading blanks, it
must be delimited with quote marks and have the same number of leading
blanks as the index key.
Macro substitution: The search argument can be a macro variable if
not bounded by parentheses. The syntax for this is &<memvar>.
Numeric keys: Clipper stores numeric index keys with leading zeros.
This means that to FIND a numeric key with a literal search argument,
you must pad it with leading zeros so there are as many digits in the
search argument as there are whole number digits in the index key. The
number of decimal digits does not matter unless the number contains
decimal values other than zero.
See Also:
INDEX
SET INDEX
SET ORDER
SET SOFTSEEK
LOCATE
SEEK
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson