>* This code will execute the function test """ 2 TIMES """????
>select iif(cValue=2,"it will not execute the function",test()+"it will execute it");
> from curTest
>
>close table all
>
>function test()
> = Messagebox("function test")
>return ""
>
>Did somebody know how to correct that error ?
>Thanks in advance !!
>
Stef,
That is not an error. VFP does a test parsing of teh SELECT commadn before it actually runs the command. You are seeing your UDF called for the text and then for the actual processing.