| Imp 运算符 |
|
Imp 运算符的语法有以下部分:
| 部分 | 描述 |
| result | 任意数值变量。 |
| expression1 | 任意表达式。 |
| expression2 | 任意表达式。 |
| 如果 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 运算符执行两个数值表达式相应位的逐位比较,并按下表设置 result 相应位:
| 如 expression1 中的位是 | 且 expression2 中的位是 | 则 result 为 |
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |