>>>>>>>>>>>>>>>
>>Adding the WHILE clause makes the SCAN/ENDSCAN not reset the record pointer to the first record.
>>>>>>>>>>>>>>>
>>
>>Doesn't SCAN FOR also start at whatever record as SCAN WHILE do?
>>
>>As opposed to SCAN that starts at the top record (with whatever controlling index tag you may have in effect).
>>
>>
>
>I don't think so. FOR requires that the SCAN try to find every record satisfying the FOR clause.
>
>The same functionality can be seen in LOCATE FOR. LOCATE starts at the first record and systematically checks each record, but if you add the WHILE clause, it starts searching from the current record position.
FWIW, I have used SCAN REST rather than WHILE NOT EOF().
Chris McCandless
Red Sky Software