Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SCAN vs. FOR
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00135531
Message ID:
00136087
Vues:
28
>NEXTThe key here is that with SCAN, you don't have to SELECT the original work area each time through the loop. This is only an issue if you SELECT another work area inside the loop. Regardless of which you use, I find the difference to be minimal. I think SCAN is much more readable than FOR i=1 TO RECCOUNT(). Without a significant difference, I would use SCAN unless you have a huge loop where speed is vital.

That's my situation, it's a large loop run many times, taking hours to run - any savings I can get is useful...I generally much prefer SCAN myself, though, too...Also, I have to switch selected tables a few times in this loop, including a query - that may be why the SCAN appears less efficient here...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform