查看: 1047|回复: 3
|
如何让vb6不把小数自动进位?
[复制链接]
|
|
请问如何让vb6不把小数自动进位??
有谁知道吗??? |
|
|
|
|
|
|
|
发表于 7-5-2007 09:45 AM
|
显示全部楼层
回复 #1 张君宝 的帖子
用fix或int都可以
dim a as double
a = 3.4
dim b as integer
b = fix(a)
或 b = int(a)
fix和int对负数不同,
fix(-4.5) ====>-4
int(-4.5) ====>-5
[ 本帖最后由 sktan007 于 7-5-2007 11:28 AM 编辑 ] |
|
|
|
|
|
|
|

楼主 |
发表于 7-5-2007 01:20 PM
|
显示全部楼层
原帖由 sktan007 于 7-5-2007 09:45 AM 发表
用fix或int都可以
dim a as double
a = 3.4
dim b as integer
b = fix(a)
或 b = int(a)
fix和int对负数不同,
fix(-4.5) ====>-4
int(-4.5) ====>-5
thx alot...cant type chinsese now sry |
|
|
|
|
|
|
|
发表于 7-5-2007 07:12 PM
|
显示全部楼层
原帖由 张君宝 于 7-5-2007 01:20 PM 发表
thx alot...cant type chinsese now sry
偶不明白,你说什么? |
|
|
|
|
|
|
| |
本周最热论坛帖子
|