**********************************************************
Frank van Eeken [eeken@q-ray.nl]
**********************************************************
I was looking at the function rounding. Once I had to make a Round-function and
I made exactly the same function as you showed on your VB-page.
But this one isn't working properly. (reference: VB 09-05-97)
See the example below:
Round(2.15,1) = 2.2 OK
Round(1.15,1) = 1.1 Not OK
The type declaration of the parameter X should be changed from Double to Variant.
Function Round (X as Variant, DP as integer) as Double
Round = Int((X * 10 ^ DP) + 0.5) / 10 ^ DP
End Function
Frank van Eeken
Internet: http://www.q-ray.nl, http://www.agriplus.nl
**********************************************************
Faraz Khan [Faraz.Khan@asu.edu]
**********************************************************
Use the following:
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余2页未读,立即下载