[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
LOCATE
LOCATE searches the active database file for a record that satisfies
specified criteria.
Syntax
LOCATE [<scope>] [FOR <condition>] [WHILE <condition>]
Defaults
Unless otherwise restricted by the scope or a WHILE clause, LOCATE
searches the entire database beginning with the first record.
Usage
The NEXT <n> option for the scope limits the search to the specified
number of records and begins the search at the current record.
To find the next occurrences of the specified condition, use the
CONTINUE command.
Record Pointer
If a match is found, the record pointer moves to that record and
displays the record number. FOUND() returns .T.
If no match is found, the record pointer moves to the end of the file
(EOF() is .T.) or the end of the scope if one was specified. The
message End of locate scope will be displayed. FOUND() returns .F.
Special Cases
Unless the scope is NEXT <n>, REST, or WHILE, LOCATE starts searching
at the beginning of the file. If there are multiple LOCATEs, the most
recent overrides any other.
LOCATE and CONTINUE are specific to the work area in which they are
issued. You can have a different LOCATE/CONTINUE for each work area.
If you leave the work area, they will still be in effect when you
return.
See Also:
CONTINUE
FIND
SEEK
STRTRAN()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson