Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF evaluates all expressions
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01275930
Message ID:
01275961
Vues:
10
Thank you !

>VB.NET by default does not short circuit.
>
>You need to use ANDALSO to short circuit AND conditions
>You need to use ORELSE to short circuit OR statements.
>
>If x = 1 ANDALSO y = 2
>
>If z = 1 ORELSE y = 10
>>In VFP when an if statement is processed, the processing stops when the if condition is satisfied like this:
>>
>>if .t. and (1=2) and (2=2)
>>
>>
>>The processing would stop at (1=2). Whereas in VB.Net all expressions are evaluated which could be awkward in some situations like:
>>
>>if Dataset.tables.count > and Dataset.Tables(0).rows.count > 0
>>
>>
>>Is there any language setting which alters this evaluation technique?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform