Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EVL and NVL
Message
From
18/05/2004 20:52:15
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/05/2004 20:46:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00905138
Message ID:
00905139
Views:
25
I hadn't noticed this, since I don't use nvl() with function or that sort of stuff. But yes, this goes contrary to my expectations, and I had to test it myself in order to believe it! (VFP 6). And yes, iif() - like AND, and OR - only evaluates an expression if it is necessary to do so. I hadn't tested that previously, either.

I tested nvl(). What does evl() do? It doesn't seem to be available in VFP 6.

>Yikes!
>Both these function evaluate the second parameter regardless. This goes against the "feel" of everthing else in the language (eg IIF())
>
>eg.
>? nvl('x', temp())
>
>procedure temp
>wait window 'hi'
>

>
>will run temp!
>I don't like it. :-(
>It takes away a lot of the usefulness of the evl and nvl functions - which I otherwise just love.
>
>Hey MS - Any plans to change of "fix" this.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform