Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coding Standards
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00115272
Message ID:
00115436
Vues:
20
>George,
>
>Well, I had to test it before posting the code fragment, I've stopped assuming things about languages it gets me into too much trouble. *s* I ran into a few places where the MS C/C++ compiler just optimized itself too far. Since VFP is interpretted p-code some optimizations like hoisting invariant code out of loops helps a lot.
>
Making assumptions (with computers) usually does get one into trouble *g*. Still, I think, in the overall scheme of things, setting the terminating value to a variable and leaving it alone is the best policy. Who knows? Some day they might change and then...

I still have an old version of QuickBASIC (4.0) around, and I wrote a short test in that, changing the size of an array downward inside the loops and using the number of rows as the intial terminating value. It didn't have any impact on the number of iterations either (of course, I didn't do a full compile). I wonder if this is an MS language design thing. I was shocked. Learn somethin' new every day.

>DO WHILE does force reevaluation at each iteration because it's just a little different than running a loop counter from a start value to an end value. I think FoxPro has worked like this since 2.5 days which is where I started with it.
>
I think that I recall that FOR...ENDFOR popped up in 2.0 (while it was still Fox). Might be intersting to see if the same thing applied back then. I might be aable to run down a copy of it somewhere around here.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform