Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCAN REST FOR Question....
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00807548
Message ID:
00807568
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform