Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To iif or not to iif = .t.
Message
From
31/05/2001 17:29:16
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513276
Message ID:
00513470
Views:
13
>>Was it a readability issue, or what? I'm still thinking that
>>
c=a#b
is more clear and more readable than
>>
c=iif(a=b, .f., .t.)
or, worse,
>>
if a=b
>>   c=.f.
>>else
>>   c=.t.
>>endif
>>Is it just my pet peeve, or are there some recommendations about this?
>
>I go for readability before quickness. As with the speed of processors increasing your program will increase in speed, but will never get easier to read.

I've considered this as well - and one of factors of readability is the length of any code block. Now if something takes five lines (plus the two blank lines around it, since it's a block for itself) instead of one or two, I'm not sure it actually increases the overall readability. The same goes for the long iif()s, where the expression is rather long, and the actual layout of .T. and .F. in the end is somewhat out of sight.

I'd still rather go for a short one with a line of comment.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform