Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Nested IIF()'s Versus ICASE()
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01298206
Message ID:
01298229
Views:
22
>What's the differences between nested IIF()'s and ICASE(). From what I can see, there's not
>alot of difference syntactically. Are there any performance differences?
>
>
>? ICASE(1 # 1, "One",;
>		2 # 2, "Two",;
>		3 = 3, "Three")
>
>? IIF(1 # 1, "One", IIF(2 # 2, "Two", IIF(3 = 3, "Three", "" )))
>
>
>Of course, the ICASE seems more readable than the IIF()'s.

One difference is that this ICASE will return .NULL. if all conditions evaluate to false because no Otherwise is set. If performance is a concern try to put the most likely to occur case first.
Previous
Reply
Map
View

Click here to load this message in the networking platform