◆◆◆发现VB6里面 超级离谱的 BUG ——对VB感到气愤和失望 ◆◆◆

Bugs1984 2004-07-14 09:25:21
请大家在 VB6(SP6)里面试试以下代码:

Dim long1 As Long
long1 = 60 * 2000

我和很多人都试过了,运行时竟然出现“溢出”错误!!简直难以致信啊……

都发展到SP6了,还留着这么低级的Bug,VB的制作组在干什么呀?!?!?!

……现在对VB感到气愤和失望……
...全文
255 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
TechnoFantasy 2004-07-14
  • 打赏
  • 举报
回复
楼主多次提出同一个问题,请将相同的帖子尽快结掉!
Chice_wxg 2004-07-14
  • 打赏
  • 举报
回复
发神经啊?发这么多帖子。

http://community.csdn.net/Expert/topic/3175/3175541.xml?temp=.4937555
http://community.csdn.net/Expert/topic/3175/3175514.xml?temp=.8617975
http://community.csdn.net/Expert/topic/3175/3175547.xml?temp=.4523432
http://community.csdn.net/Expert/topic/3175/3175545.xml?temp=8.430117E-02
http://community.csdn.net/Expert/topic/3175/3175528.xml?temp=.9981501
http://community.csdn.net/Expert/topic/3175/3175538.xml?temp=9.868801E-03
http://community.csdn.net/Expert/topic/3175/3175537.xml?temp=.3482172
http://community.csdn.net/Expert/topic/3175/3175535.xml?temp=.7635309
http://community.csdn.net/Expert/topic/3175/3175524.xml?temp=.1432917
http://community.csdn.net/Expert/topic/3175/3175521.xml?temp=.2143976


反正必删,我也来灌水啊,呵呵
huangjianyou 2004-07-14
  • 打赏
  • 举报
回复
^_^
TechnoFantasy 2004-07-14
  • 打赏
  • 举报
回复
VB默认对数值的处理是Integer,即16位的,所以会溢出。不能算Bug,这个是VB的数值处理方式。
TechnoFantasy 2004-07-14
  • 打赏
  • 举报
回复
这样转换一下:

Dim long1 As Long
long1 = CLng(60) * CLng(2000)

743

社区成员

发帖
与我相关
我的任务
社区描述
VB 版八卦、闲侃,联络感情地盘,禁广告帖、作业帖
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧