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