四舍五入

//四舍五入加强版,可指定到小数后几位function RoundPlus(Value: Extended;Length: Integer): Extended; procedure Set8087CW(NewCW: Word); asm MOV Default8087CW,AX FNCLEX FLDCW Default8087CW end;const RoundUpCW = $1B32;var OldCW : Word; s: string;begin if Length = 0 then s := '0' else s := '0.' + Repl('
posted @ 2007-10-14 21:43  delphi中间件  阅读(264)  评论(0编辑  收藏  举报