General information
Category:
Coding, syntax & commands
I understand,but this behaviour caused me some problems, because I had code like : Select field1,iif(field2=0,0,field3/field2) as nCalc from myTable.
I have some ole control (tee chart) in this form, and when i put my ole control visible VFP send to me a messagebox with the text "Floating point division by zero."
But it's ok, I corrected my code with the help of David Stevenson.
Thanks !
>>* 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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only