Ms7 Search
Google 搜尋 翻譯
calendar
« 九月 2024 »
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
近期文章
文章分類
網站連結
Syndicate

« | »

Access 奇怪的無條件捨去 Int 函數

2010-06-14 @ 14:31 in Windows

在 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!

作者 best web hosting 2020 @ 19:53, 2020-08-06

Access 奇怪的無條件捨去 Int 函數 | 豬窩

This paragraph provides clear idea designed for the new viewers of blogging, that truly how to do blogging and site-building.

作者 web hosting reviews @ 19:21, 2020-08-07

Access 奇怪的無條件捨去 Int 函數 | 豬窩

It's difficult to find experienced people for this subject, however, you
sound like you know what you're talking about!
Thanks

作者 best web hosting 2020 @ 09:32, 2020-08-10
«上一篇   1 2 3 4
發表迴響
 authimage