Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Iif(lExp, .t., .f.)?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01445223
Message ID:
01445259
Vues:
71
>>>Which is what I expected
>>>
>>>If the expr is null it takes the else part of the iif()
>>>
>>Great thought about NULL.
>
>Yep, but NULL is nether .T. neither .F.
>I would use NVL() instead of IIF() :-)

Right, but good that Gregory brought nulls into the picture since often we forget to check logical expression for NULL.

In other words, the original statement could have been written as

Condition = llExp IS NOT NULL and llExp

or

Condtion = llExp IS NULL OR llExp

Depending on what do we want to check.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform