>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.
>
Walter,
The statement is interpreted once and called multiple times in a FOR...NEXT iteration structure. There's no question about it.
George
Ubi caritas et amor, deus ibi est