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:57:31
 
 
To
31/05/2001 13:15:07
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00513276
Message ID:
00513305
Views:
12
>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.

>Is it just my pet peeve, or are there some recommendations about this?

I've seen variations on this in code I have to maintain. I tend not to do it but I can understand how seeing the .T.,.F. makes the code slightly more readable.

One place where I think this extra clarity is worthwhile is a variant of one of your examples.
c = IIF(a = b,.T.,.F.)
rather than
c = a = b
since someone where Fox is not a primary language (probably more true in the 2.6 world) could look at that as
STORE b TO a,c
.......Rich
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform