Me
2006-11-23 18:03:02 UTC
i have this little code
Private Sub Form_Load()
Dim i As Long, i2 As Long
i = 1193046 And &HFFFF
MsgBox Hex(i)
End Sub
now 1193046 in hex is 123456
but when i run the program, the value i get from msgbox is '123456'
which is incorrect since i did AND with FFFF.. so i should get '3456'
i think this is a problem with vb (big problem for me)
because if i do the AND using only &HFF it cuts it correctly..
http://www.phoenixbit.com
Private Sub Form_Load()
Dim i As Long, i2 As Long
i = 1193046 And &HFFFF
MsgBox Hex(i)
End Sub
now 1193046 in hex is 123456
but when i run the program, the value i get from msgbox is '123456'
which is incorrect since i did AND with FFFF.. so i should get '3456'
i think this is a problem with vb (big problem for me)
because if i do the AND using only &HFF it cuts it correctly..
http://www.phoenixbit.com