Syntax |
expression1 And expression2 |
||
Description |
Performs a logical or binary conjunction on two expressions. |
||
Comments |
If both expressions are either Boolean, Boolean variants, or Null variants, then a logical conjunction is performed as follows: |
||
|
If the first |
and the second |
then the |
|
True |
True |
True |
|
True |
False |
False |
|
True |
Null |
Null |
|
False |
True |
False |
|
False |
False |
False |
|
False |
Null |
Null |
|
Null |
True |
Null |
|
Null |
False |
False |
|
Null |
Null |
Null |
|
Binary Conjunction If the two expressions are Integer, then a binary conjunction is performed, returning an Integer result. All other numeric types (including Empty variants) are converted to Long, and a binary conjunction is then performed, returning a Long result. Binary conjunction forms a new value based on a bit-by-bit comparison of the binary representations of the two expressions according to the following table: |
|
1 |
And |
1 |
= |
1 |
Example: |
|
0 |
And |
1 |
= |
0 |
5 00001001 |
|
1 |
And |
0 |
= |
0 |
6 00001010 |
|
0 |
And |
0 |
= |
0 |
And 00001000 |
Example |
Sub Main() n1 = 1001 'This example performs a logical And comparing
b1 and b2 and displays |
|||||
See Also |
Operator Precedence (topic); Or (operator); Xor (operator); Eqv);(operator); (operator). |
|||||
|
|
|
|
|
|
|
A |