And 运算符
对两个表达式进行逻辑“与”运算。
[code]result = expression1 [b]And[/b] expression2[/code]
[h3]参数[/h3]result
任意数值变量。
expression1
任意表达式。
expression2
任意表达式。
[h3]说明[/h3]当且仅当两个表达式均为 [b]True[/b],则 [b]result[/b] 为 [b]True[/b]。如果任一表达式为 [b]False[/b],则 [b]result[/b] 为 [b]False[/b]。下表说明如何确定 [b]result[/b]:
| 如果 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 |
[b]And[/b] 运算符还对两个数值表达式中位置相同的位执行逐位比较,并根据下表设置 [b]result[/b] 中相应的位:
| 如 expression1 中的位是 | 且 expression2 中的位是 | 则 result 为 |
|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |