Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOR EACH vs FOR NEXT
Message
De
19/07/1999 11:41:40
Timothy Enright
Coos Bay Public Schools
Coos Bay, Oregon, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00242791
Message ID:
00243122
Vues:
36
>>My assumption is the block of code between the FOR EACH (...) NEXT get compiled and executed in ASM or C while the code between the FOR (...)NEXT get compiled and executed in VFP. This would make the FOR EACH considerably fast when acting upon a grid with many columns OR a form with many controls - am I right?
>>
>Hi tim,
>
>As the others have mentioned, because VFP use tokenized p-code, there's no difference in the way the code is run. FOR EACH, however, is actually slower, by about 40% in my tests. I would assume that this is because of the implicit assignment to a variable that occurs.

Tokenized p-code, hum... something new (to me). Thanks to all that responded to this thread!

...tim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform