VB6中的Clong溢出 [英] Clong overflow in VB6

查看:41
本文介绍了VB6中的Clong溢出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 VB 6.0 中使用 Clong 数据类型时出现溢出错误,因为值非常大.如何克服这一点?除了 Clong 数据类型之外,还有其他可用的东西吗?

I'm having an overflow error in VB 6.0 when using the Clong datatype because of really big values. How to overcome this? Is there anything else available higher than the Clong datatype?

推荐答案

您可以使用 Double 而不是 Long,因为它可以容纳更大的数字.函数是 CDbl() 而不是 CLng().

You could use a Double instead of a Long since it can hold larger numbers. The function is CDbl() instead CLng().

在 VB6.0 中,一个 Long 是 32 位,可以容纳的值最大为:2,147,483,648
Double 是 64 位,并且可以是旧值:1.79769313486231570E+308

In VB6.0, a Long is 32-bits and can hold values up to: 2,147,483,648
A Double is 64-bits and can old values up to: 1.79769313486231570E+308

请参阅此参考

这篇关于VB6中的Clong溢出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆