问题
Can someone just help me refresh my mind?
How do you specify hex values in a Visual Basic 6 / VBScript Source?
It's not 0xABCD as it is in C++, that's what I can remember... It was something similar... But what?
回答1:
Try &HABCD, that's how it works for most BASIC languages.
回答2:
VBScript \ VBA \ VB6 (and lower):
Dim MyValue As Integer
MyValue = &h1234
VB (.NET Framework):
Dim MyValue As Integer = &h1234
Versions are usually backwards compatible syntax-wise, you cannot always use newer syntax in older versions.
回答3:
&H<hex-value> if my memory serves my correctly.
Like: &HABCD
回答4:
msgbox hex(255)
来源:https://stackoverflow.com/questions/428643/hex-value-in-visual-basic