VBS教程:運算符-And 運算符
And 運算符
對兩個表達式進行邏輯“與”運算。
result = expression1 And expression2
參數(shù)
result
任意數(shù)值變量。
expression1
任意表達式。
expression2
任意表達式。
說明
當且僅當兩個表達式均為 True,則 result 為 True。如果任一表達式為 False,則 result 為 False。下表說明如何確定 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 運算符還對兩個數(shù)值表達式中位置相同的位執(zhí)行逐位比較,并根據(jù)下表設(shè)置 result 中相應(yīng)的位:
如 expression1 中的位是 | 且 expression2 中的位是 | 則 result 為 |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
相關(guān)文章
VBS教程:VBscript語句-Property Get 語句
VBS教程:VBscript語句-Property Get 語句...2006-11-11使用 Iisext.vbs 添加Web服務(wù)擴展文件的方法
這篇文章主要介紹了如何使用 iisext.vbs 在本地或遠程計算機上添加 Web 服務(wù)擴展文件,需要的朋友可以參考下2014-07-07用VBS模擬實現(xiàn)PHP的sha1_file函數(shù)效果代碼
用VBS模擬實現(xiàn)PHP的sha1_file函數(shù)效果代碼,需要的朋友可以參考下。2011-01-01vbs能調(diào)用的系統(tǒng)對象小結(jié)
這篇文章主要介紹了vbs能調(diào)用的系統(tǒng)對象小結(jié),需要的朋友可以參考下2018-04-04