笑嘻嘻

解决方案 »

  1.   

    ShowMessage(FormatFloat('#,##0.00', 2.34));
      

  2.   

    var
      d: double;d := 2.34;
    ShowMessage(FormatFloat('0.00', d - Trunc(d)));
      

  3.   

    formatfloat返回的是字符串,我要的是格式化后的小数值
      

  4.   

    var
       num:byte;
       source,dest:real;
    begin
       num:=3;
       source:=12.234324;
       dest:=frac(source);
       dest:=int(dest*power(10 , num))/power(10, num);
       showmessage(floattostr(dest));
    end;
      

  5.   

    多此一举了,呵呵,可以format后再strtofloat的。