我的窗体有三个text控件,三个控件的内容为:text1.text=59565.70
text2.text=50910.87
text3.text=8654.83
我用if val(text1.text)<>val(text2.text)+val(text3.text) then
......
end if为什么if语句为true ,照道理不是相等的么?
而我这样写round(if val(text1.text),2)<>round(val(text2.text)+val(text3.text),2) then
......
end if
就能相等
为什么?
text2.text=50910.87
text3.text=8654.83
我用if val(text1.text)<>val(text2.text)+val(text3.text) then
......
end if为什么if语句为true ,照道理不是相等的么?
而我这样写round(if val(text1.text),2)<>round(val(text2.text)+val(text3.text),2) then
......
end if
就能相等
为什么?
......
end if
当然整数部分也不能太大
数的范围是 -2^63/10000 to (2^63-1)/10000