Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which Should I Use IF/ENDIF or IIF
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00668532
Message ID:
00668678
Views:
16
>Sergey;
>
>I think all code should be contained on one line - it runs faster. My goal is to write a complete application on one row. Think of the speed! :)


At some point, under influence of the C book I read at that time, I wrote code like that
llOk = Func1() And func(2) And (Func3) ... and so on
Not very readable but compact. :)

>In real life I will normally use structured code for readability and sometimes IIF statements when needed. Some IIF statements can be complex to understand.

The same here. If I've a choice between IIF() and IF I would use IIF() only if condition is simple and there could be multiple separate squential statements with IIF()'s. In this case code would be more readable with IIF() because of it compactness.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform