Walter Meester
HoogkarspelPays-Bas
George,
>>>My example (the FOR...NEXT loop) does exactly the same thing: Calls functions multiple times. That's where the additional overhead comes in.
>>
>>But in your example the statment is both interpretated and called for each loop, while in a SQL statement it is only interpretated onces and called for each selected record. This is were the difference is. IOW your example does not reflect the same situation. It might have been another issue if you used a REPLACE ALL of CALCULATE MAX() command to illustrate.
>The statement is interpreted once and called multiple times in a FOR...NEXT iteration structure. There's no question about it.
You might want to check this again, because it is not true. VFP operates on P-code. That means that for every instruction the P-code has to be executed in the P-code interpretor. whether the VFP can optimize things in a FOR NEXT loop, I simply don't know, but it surely is interpretated for each command line to set some internal variables and handle some windows messages depending on some settings, debugger stuff, and of course to executed the C/C++ implementation of the command.
If you don't believe me, just check some books about interpretating or ask the VFP team....
Walter,
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement