IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB.Net  Print This     

Logical Operators (VB.Net and ASP Classic Cross Reference Guide)

By Mike Prestwood

VB.Net versus ASP Classic: A side by side comparison between VB.Net and ASP Classic.

 
Operators
 

A language symbol used for assignment, comparison, computational, or as a logical.

Logical Operators

[Other Languages] 

Languages Focus

Logical operators perform conditional and, or, and not operations. Some languages support both binary logical operators that link two and unary logical operators negate (make opposite) the truth value of its argument. Finally, some languages short circuit logic. For example, with this or that, if this is an expression returning true, then that is never executed.

VB.Net: 

VB.Net logical operators:

And and, as in this and that No Short Circuit
AndAlso and, as in this and that short circuits
Or or, as in this or that No Short Circuit
OrElse or, as in this or that short circuits
Not Not, as in Not This
Xor either or, as in this or that but not both

Syntax Example:  
'Given expressions a, b, c, and d:
If Not (a and b) and (c or d) Then
  'Do something.
End If
ASP Classic:   and, or, not

Same as VB. ASP Classic logical operators:

and and, as in this and that
or or, as in this or that
Not Not, as in Not This

ASP Classic never short circuits. Given the expression this or that as well as this and that, if this evaluates to false, then that is still executed.

Syntax Example:
'Given expressions a, b, c, and d:
If Not (a and b) and (c or d) Then
  'Do something.
End If












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]