Implemented in version 1.0
The And operator is used to perform a logical conjunction on two
expressions, where the expressions are Null, or are of Boolean subtype
and have a value of True or False.
The And operator can also be used a "bitwise operator" to make a bit-by-bit comparison of
If both bits in the comparison are 1, then a 1 is returned.
Otherwise, a 0 is returned.
When using the And to compare Boolean expressions, the order of the expressions is not important.
<% =True And True %>
<% =True And False %>
<% =False And True %>
<% =False And False %>
<% =True And Null %>
<% =Null And True %>
<% =False And Null %>
<% =Null And False %>
=Null And Null %>
<% anyexpression = True %>
<% someexpression = False %>
<% =anyexpression And someexpression %>
In this example, the And performs a bitwise comparison on the 1 (in binary 001)
and the 2 (in binary 010), and returns a 0 (in binary 000).
Expression1 = 1
Expression2 = 2
Result = Expression1 And Expression2
Response.Write "Result = " & Result
Result = 0
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.