Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN REST FOR Question....
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00807548
Message ID:
00807568
Views:
20
If you don't include a scope at all .. the default will be ALL .. otherwise it follows the scope identified in the command. Because you have the REST clause included .. it will only scan starting at the current position.

As for using FOR vs WHILE .. If you use FOR, it will scan until the end of the file. If you use WHILE, it will scan until the condition is no longer valid. Because you are using an index, and have SEEKed to the starting value, WHILE would probably be much faster in this case

SEEK avalue
SCAN REST WHILE thistable.fieldvalue = avalue



Cathy

>In looking at code at my new job, I came across the following construct.....
>
>SEEK avalue
>SCAN REST FOR thistable.fieldvalue = avalue
>
>dahdahdah....
>
>ENDSCAN
>
>Question....
>
>Will the SCAN begin where the REST starts... or will it start over at the beginning of the table because of the FOR?? (A speed concern here.....)....
>
>Thanks
>
>Tommy
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform