//没有
function ZsTrunc(mFloat: Extended; mTrunc: Integer): Extended; { 指定位数截尾舍入 }
begin
//  987654321.123456789
//         +(0)-
  mFloat := Int(mFloat * Power(10, -mTrunc));
  Result := mFloat * Power(10, mTrunc);
end; { ZsTrunc }function ZsRound(mFloat: Extended; mTrunc: Integer): Extended; { 指定位数四舍五入 }
begin
//  987654321.123456789
//         +(0)-
  mFloat := Int(mFloat * Power(10, -mTrunc) + 0.5);
  Result := mFloat * Power(10, mTrunc);
end; { ZsRound }//Test
procedure TForm1.Button1Click(Sender: TObject);
var
  X: Extended;
begin
  X := StrToFloat(Edit1.Text);
  Caption := Format('%f', [X - ZsTrunc(X, 2)]);
end;

解决方案 »

  1.   

    //将就用吧
    //哦别忘了uses Math;
      

  2.   

    不是直接有,而是间接有。
    1.如果在系统中,那么可以用Format()函数,然后再StrToFloat()
    2.如果是在SQL语句中,那么不同的数据库不太一样,不过一般是ROUND()函数,例如:SQL-SERVER、VFP等
      

  3.   

    用好StrToFloat(),FloatToStr(),Format(%.2f)可以解决你的问题
    任你在字符串和浮点数之间转换。
      

  4.   

    很简单,一条代码即可:
      Label1.Caption := Format('%.2f',[1234.5678]);  
      

  5.   

    补充:
      Format('%.2n',[1234.5678]) 可实现1,234.57这样的效果!
      

  6.   

    var
       D:Double;
    begin
         D := Trunc(D*100) / 100;
    endTrunc is a standard routine,you can get it from Delphi Help.
    Good Luck!
      

  7.   

    floattostrf(数值,FFFIXED,12,2);
    OR
    formatfloat('0.00',数值);