摘要
在面向对象的可视化开发工具Delphi系统中 ,提供了专门的四舍五入函数Round ()。该函数存在一定的缺陷。本文通过实例列举出了四舍五入函数Round ()的缺陷所在 ,提出了对这一缺陷的改进方法 ,并设计了相关的自定义四舍五入函数程序。
In OOP Delphi,there is a special function of round,that is “Round(x)”. It returns an incorrect result sometimes. In this paper, author shows a bug in the function through test of data, then ,it is also adduced to solve the problem method and supplied the program of our define function.
出处
《微机发展》
2000年第4期51-52,共2页
Microcomputer Development