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