Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To iif or not to iif = .t.
Message
De
31/05/2001 13:57:31
 
 
À
31/05/2001 13:15:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00513276
Message ID:
00513305
Vues:
13
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform