Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT Optimization BUG or Limit ?
Message
 
 
To
04/05/2003 05:32:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00784112
Message ID:
00784671
Views:
17
>Hi Sergey,
>
>Example n°2 it is not correct.
>
>z=1
>SELECT *,m.z Z from ctop WHERE cyclePlus() AND m.z>1
>
>PROCEDURE cyclePlus
>z=z+1
>ENDPROC
>
>However I am not of agreement with you.
>
>Thanks
>
Hi Fabio,

I'm not sure what you disagree with. Here're two excerpt from VFP help:

"The only reliable way to pass values to user-defined functions invoked from SELECT is by the argument list passed to the function when it is invoked.
If you experiment and discover a supposedly forbidden manipulation that works correctly in a certain version of FoxPro, there is no guarantee it will continue to work in later versions."

UDF() should not change values outside of it's scope (body). What you're doing is a "trick", so don't expect it to always work.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform