Visual Basic Scripting Edition | 語言參考 |
對兩個表達式進行邏輯蘊涵運算。
result = expression1 Imp expression2
result
任意數(shù)值變量。
expression1
任意表達式。
expression2
任意表達式。
下表顯示如何確定 result 的取值:
如果 expression1 為 | 且 expression2 為 | 則 result 為 |
---|---|---|
True | True | True |
True | False | False |
True | Null | Null |
False | True | True |
False | False | True |
False | Null | True |
Null | True | True |
Null | False | Null |
Null | Null | Null |
Imp 運算符執(zhí)行兩個數(shù)值表達式相應(yīng)位的逐位比較,并按下表設(shè)置 result 相應(yīng)位:
如 expression1 中的位是 | 且 expression2 中的位是 | 則 result 為 |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 0 |
1 | 1 | 1 |
版本 1
Eqv 運算符 | 邏輯運算符 | 運算符優(yōu)先級 | 運算符概述