Visual Basic Scripting Edition | 語言參考 |
對兩個表達式進行邏輯“與”運算。
result = expression1 And expression2
result
任意數(shù)值變量。
expression1
任意表達式。
expression2
任意表達式。
當且僅當兩個表達式均為 True,則 result 為 True。如果任一表達式為 False,則 result 為 False。下表說明如何確定 result:
如果 expression1 為 | 且 expression2 為 | 則 result 為 |
---|---|---|
True | True | True |
True | False | False |
True | Null | Null |
False | True | False |
False | False | False |
False | Null | False |
Null | True | Null |
Null | False | False |
Null | Null | Null |
And 運算符還對兩個數(shù)值表達式中位置相同的位執(zhí)行逐位比較,并根據(jù)下表設置 result 中相應的位:
如 expression1 中的位是 | 且 expression2 中的位是 | 則 result 為 |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
版本 1
邏輯運算符 | Not 運算符 | 運算符優(yōu)先級 | 運算符概述 | Or 運算符 | Xor 運算符