VBScript And 运算符

来源: 作者: 2007-11-22 出处:pcdog.com

And 运算符

对两个表达式进行逻辑“与”运算。

result = expression1 And expression2

参数

result

任意数值变量。

expression1

任意表达式。

expression2

任意表达式。

说明

当且仅当两个表达式均为 True,则 resultTrue。如果任一表达式为 False,则 resultFalse。下表说明如何确定 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 运算符还对两个数值表达式中位置相同的位执行逐位比较,并根据下表设置 result 中相应的位:

如 expression1 中的位是 且 expression2 中的位是 则 result 为 0 0 0 0 1 0 1 0 0 1 1 1  

上一篇:VBScript - The Easy Stuff - Page 2
下一篇:VBScript Class 对象