vb中的if not語句怎么用啊
If Not不是一個語句?
If 是一個語句,而Not是一個布爾運算符號。
if語句的一種格式如下:
例1:
x = 100
If x >5 Then '這里你要理解因為x=100,所以對于 x >5的判斷結果為True
Print "Ok"
End If
這個代碼結果,輸出"Ok"
以上代碼,用大白話來說就是:“如果x大于5,就輸出OK”
例2:
x = 100
If Not x 5的判斷結果為False,而Not False又為True
Print "Ok"
End If
這個代碼結果,輸出還是"Ok"
以上代碼,用大白話來說就是:“如果不是x小于5,就輸出OK”
比較兩句大白話“x大于5”與“不是x小于5”其實是一個意思。
最后要理解If語句的執行原理:
If Then
語句組
End If
當 的值為True,執行“語句組”,否則就不執行“語句組”。
“if not”在句子中間的用法很令人困擾,請幫忙翻譯一下下面的句子-
摘自《牛津高階英漢雙解詞典》(第7版)1014頁:if not---used to suggest that sth may be even larger, more important, etc. than was first stated (表示可能更大或更重要等)。
they cost thousands if not millions of pounds to build. 建設要耗費數千英鎊,甚至可能是數百萬英鎊。所以本句的意思是:最壞的部分是,很多甚至可能是所有這些錯誤都是可以避免的。
同一個句子用if not和if so 造句
if not
英 [if n?t] 美 [?f nɑt]
要不,不然; 若非;
She understood his meaning, if not his words, and took his advice.
她即便沒聽懂他的話,也明白了他的意思,并且接受了他的建議。
if so
假如這樣的話;
She understood his meaning, if so his words, and took his advice.
求完成:用if
they won't know the truth unless you tell them
you will hurt your eyes unless you take a rest after using computers for a long time
we will be late for the meeting if we don't take a taxi there
your parents will get angry unless you finish your homework
people will get sick easily if we all don't try our best to protect the earth
he will come if he is not busy
she can't join the club unless she applies for it
there won't be a nwe bridge unless the government offers the fee
If you don't agree to give us 3 more days,we aren't able to finish the project
we can't win the match unless we practice every day
unless= if (。)not
2個單詞的區別unless和ifnot在句子Youshouldn
呵呵,我也曾見過你所謂的一大套理論。
這種東西,呵呵,我也看不懂,而且我認為也完全沒有必要研究到那程度,從未見過有關的考題,可能我太功利了點,但考試不考而且日常的實用英語中也派不到大用處,我就不去研究了。 章振邦只提到unless分句本身是否定句,unless就不等于if。
。
not 如:You will get a good grade in the course unless you don't do your homework。 還有unless如果引導的是非真實情況,即虛擬時,不能用if。
。
not代替 如:They couldn't afford to live in such an expensive apartment unless(除非) they were rich。 如果變為if they were not rich,那么就與原意相反了。
你說的那些,我看不懂。 如果你不放心就請問你們老師吧。