我正在閱讀一些asp代碼,我無法弄清楚if <> (whatevernumber)
的含義。什麼是經典asp中的「if <> 6」?
是<>
是否等於,或者它可能不同?我不能谷歌這個問題,因爲它沒有搜索符號..
我正在閱讀一些asp代碼,我無法弄清楚if <> (whatevernumber)
的含義。什麼是經典asp中的「if <> 6」?
是<>
是否等於,或者它可能不同?我不能谷歌這個問題,因爲它沒有搜索符號..
「<>」 是比較。你必須在每一邊放置一個數字或變量。例如:「嘿,電腦!比較x與z並告訴我他們是否不相同!」你會喜歡這種類型的吧:
if (x<>z) then response.write ("hey x and z are not equal! Gimme ten dollars!")
給出的代碼片段是一個錯誤的語法時才:
>> If <> 6
>>
Error Number: 1002
Error Description: Syntax error
它缺少一個操作數來比較和Then
。 「<>」 是不等於/不同operator:
>> If 6 <> 6 Then WScript.Echo "different" : Else WScript.Echo "equal to" : End If
>>
equal to
>> If 7 <> 6 Then WScript.Echo "different" : Else WScript.Echo "equal to" : End If
>>
different
這意味着不等於,例如'='看http://msdn.microsoft.com/en-us/library/9hck4s70(v=vs.84)! aspx – Steve