Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scan Endscan
Message
De
24/06/2005 13:00:53
 
 
À
24/06/2005 12:50:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01026363
Message ID:
01026366
Vues:
41
>Hi All. I have been reading some threads about SCAN - ENDSCAN. Due to old habits I have used DO WHILE but am interested in the speed improvements that SCAN ENDSCAN appear to offer.
>
>Any gotchas to watch out for when converting DO WHILE loops to SCAN ENDSCAN? I did read Dragan's comment about nested SCAN's on the *same* file. Are there any others?

Don't forget to take the SKIP command out.

FWIW, last time I tested (which was with VFP 7), on an unordered table, SCAN was about 1.5 times as fast as DO WHILE. For ordered tables, it's not quite as clear-cut; the differences seem to depend on the index order.

But overall, you can't go wrong using SCAN for looping through a table.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform