Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF() bug or feature?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01499384
Message ID:
01499406
Vues:
49
This message has been marked as a message which has helped to the initial question of the thread.
>Hi,
>I have DevideByZero exception in expression when LN_QTY=0D
>
>LN_RESULT = IIf(LN_QTY > 0D, LN_SUM / LN_QTY, -1D)
>
>I expect function return me -1D, but so far as I see, VB compiler evaluate every expression not depends from logical rule?
>
>Is it bug or feature? Is the same in C# ?
>
>Thanks
>Denis

IIF in VB does evaluate all expressions no matter what. It is a significant difference from VFP and can be very annoying!
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform