Command CONTINUE Foundation
Continues the execution of the last LOCATE command.
CONTINUE
In each work area, the command LOCATE can be used to define a search condition used in sequential searches for records in the work area. The search is initialized using LOCATE and can be continued with CONTINUE. Using CONTINUE, all records in a work area matching a search condition can be found.
The command CONTINUE moves the record pointer in the work area until a matching record is found. This record then becomes the current record and the function Found() returns the value .T. (true). If no matching record is found, Found() returns .F. (false) and the record pointer is positioned after the last record. The function Eof() then also returns the value .T. (true).
The FOR condition used with the previous LOCATE command is retained in the work area. However, the WHILE condition of the LOCATE command is not considered by CONTINUE.
// The example uses LOCATE and CONTINUE to list all
// employees in an employee database belonging to a
// specific department.
PROCEDURE MAIN
LOCAL cDepartment := "S-DEV"
FIELD EmpNo, LName, FName
USE Employee NEW
LOCATE FOR FIELD->DeptNo = cDepartment
IF Found()
? "Employees in department:", cDepartment
DO WHILE Found()
? EmpNo, LName, FName
CONTINUE
ENDDO
ENDIF
CLOSE Employee
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.