Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF evaluates all expressions
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01275930
Message ID:
01275961
Views:
11
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform