呵呵。
如果是用DELPHI6的话,可以用RoundTo()也可以试试我写的这个,顺便帮忙看看有没有问题。
function MyRound(X: Extended; APrec :integer) :Extended ;
var
  BaseNum :Extended ;
begin
  BaseNum := Power(10, APrec) ;
  Result := Round(X * BaseNum + 5 / BaseNum) / BaseNum ;
end;

解决方案 »

  1.   

    showmessage(Format('%.2f', [123.456]));
    a :=round(a *100) /100 ;
      

  2.   

    str := Format('%5.3f',[3.123467]),这样做就可以将变量格式化了:
    myvalue:=3.123467;
    str:=Format('%5.3f',[myvalue]);
    myvalue:=StrToFloat(str);
      

  3.   

    StrValue := currtostr(trunc(value * 100 + 0.5));
      

  4.   

    我赞成用
    formatfloat函数
    格式:
    function FormatFloat(const Format: string; Value: Extended): string;
    返回串值可直接显示,而且不存在.5舍去的问题
      

  5.   


    你要'四舍五入到小数后N位',说明你要的结果数据类型已不是整型,所以,为了确切回答你的问题,还必须先说明转换结果数据类型,因为这并不是唯一的,在delphi中有多种意义的实型数,包括real,double,extended. 
      

  6.   

    用标准SQL函数,我前两天还用过(又忘了),找找吧