Delphi 四舍五入含小数点函数


本文整理自网络,侵删。

 
要先 use System.Math; 然後?得?入的是extended,如果是double的?,小?滴?稻??有?`差
// MyRound 四?挝迦?
// input
// amt 金?~
// iprecision 小?滴??(?A?O0)
// ouput
// string 文字
Function MyRound(amt:extended ;iPrecision:Integer=0):String;
var
S:String;
i1:Integer;
Begin
S:= ”;
i1:= iPrecision * -1;
S:= FloatToStr(SimpleRoundTo(Amt,i1));
result := s;
End;

相关阅读 >>

Delphi xe5 Delphi 解析 json

Delphi fdconnection1 获取数据库总记录数

Delphi getwebbrowserhtml 获取网页源代码

Delphi 使用钩子函数 - 数据传递

Delphi savelog 日志

Delphi 得到一个cuid用户唯一标识

Delphi xe6 android 实现base64字符串的解析

Delphi cookie获取及使用

Delphi windows 编程[1] - 窗体生成的过程一

Delphi tfilestream流操作1

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...