以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  移位  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=34235)

--  作者:dtcuiwww
--  发布时间:2013/6/3 14:06:00
--  移位

Dim d As Byte =&h01
d = d << 8
MessageBox.Show(hex(d))

为什么移了8位结果不为"0",而是&h01

 

VS.NET 2010的VB中为"0"


--  作者:Bin
--  发布时间:2013/6/3 14:17:00
--  
VS2010 狐表都弹出为1 并没发现问题啊.
--  作者:dtcuiwww
--  发布时间:2013/6/3 15:08:00
--  

在变量D中&h01左移八位后,D中应等于0,怎么是1呢?

因为我调用编写的crc16程序结果和VC的结果老是不一样