Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To iif or not to iif = .t.
Message
From
31/05/2001 13:15:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
To iif or not to iif = .t.
Miscellaneous
Thread ID:
00513276
Message ID:
00513276
Views:
61
Here's a quote from a recent thread:
loColumn.DynamicFontBold = "'IIF(THIS.PARENT.gnRecNo = RECNO THIS.PARENT.RecordSource), .T., .F.)'"
I wouldn't be starting on this if this was the only one, but I'm seeing the IIf({expL}, .T., .F.) just far too often, so I started wondering what made this become customary.
I've even seen IIF(.T., .F., .F.) in a property (where a string containing a logical expression was expected).
What I don't understand is why would anyone want to write
If DESCENDING()
	Thisform.lSaveAscending = .F.
Else
	Thisform.lSaveAscending = .T.
Endif
instead of
Thisform.lSaveAscending =NOT DESCENDING()
Or why is this form
llHasValue=iif(empty(lcValueString), .F., .T.)
preferrable over the
llHasValue=not empty(lcValueString)
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?

back to same old

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

Click here to load this message in the networking platform