Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scan versus Scan While Not EOF()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00448536
Message ID:
00448550
Views:
8
>>>>>>>>>>>>>>>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform