General information
Category:
Coding, syntax & commands
Version 8 Hilmar. Cheers.
>Thanks. I don't have it, so it must be new in version 7 or 8.
>
>As a workaround, of course you can make your own version of nvl(), which you might call MyNvl() (using iif(), or if), but this will be less efficient than a built-in function.
>
>>evl() is the best function ever! Tests for empty value, eg
>>
>>procedure test
>>lparameter tcMsg
>>local cMsg
>>cMsg= evl(m.tcMsg, 'Hey you')
>>wait window m.cMsg
>>
>>
>>>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.
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