Access 奇怪的無條件捨去 Int 函數
在 Access 的 VBA 中
vInt = 77.32 * 0.5 ==> 38.66
vInt = 77.32 * 0.5 * 100 ==> 3866
vInt = Int(77.32 * 0.5 * 100) ==> 3865 竟然少1
vInt = Int(77.32 * 0.5 * 100) / 100 ==> 38.65 取小數第二位無條件捨去的結果,竟然少0.01
vInt = 77.32 * 0.5 * 100 ==> 3866
vInt = Int(vInt) / 100 ==> 38.66 將數值成 100 放在變數,再將變數取整數,再除於100,則結果就沒問題
不知這是什麼問題, 看來只好多用一條式子,再轉換,而不能一式到底,這是不是 呷緊弄破碗
迴響
Access 奇怪的無條件捨去 Int 函數 | 豬窩
It's appropriate time to make some plans for the future and it is time to be happy.
I have read this post and if I could I want to suggest you some interesting things or
advice. Maybe you could write next articles referring to this article.
I wish to read even more things about it!
Access 奇怪的無條件捨去 Int 函數 | 豬窩
This paragraph provides clear idea designed for the new viewers of blogging, that truly how to do blogging and site-building.
Access 奇怪的無條件捨去 Int 函數 | 豬窩
It's difficult to find experienced people for this subject, however, you
sound like you know what you're talking about!
Thanks