Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To iif or not to iif = .t.
Message
 
À
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:
00513324
Vues:
25
Dragan,

>>Here's a quote from a recent thread:
loColumn.DynamicFontBold = "'IIF(THIS.PARENT.gnRecNo = RECNO(THIS.PARENT.RecordSource), .T., .F.)'"
Oh, jeez... I knew I shouldn't have used that example. This snippet is from a legacy class, that, while it does some truly amazing things, did benefit from some cleanup.


>>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?


Personally, I prefer the code be as clean as possible, with copious documentation. If I can make the code self-documenting (i.e. defines, etc.) so much the better. I had changed the code to:
loColumn.DynamicFontBold = "(THIS.PARENT.gnRecNo = RECNO(THIS.PARENT.RecordSource)"
but it still didn't work :-|

Anyway, I suspect I used the IIF() version of the code to make the example as clear as possible.

Regards,
Thom C.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform