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:15:07
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
To iif or not to iif = .t.
Divers
Thread ID:
00513276
Message ID:
00513276
Vues:
63
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform