如题,谢了!

解决方案 »

  1.   

    Format('%0.4f', [real变量或常量]),返回值为字符型,如下:
    var
      tmpReal: Real;
      tmpStr: string;
    begin
      tmpReal := 123.343;
      tmpstr := Format('%4.4f', [tmpReal]);
    end;这样tmpStr的值就为:'123.3430'
      

  2.   

    var
      str:string;
      temp:real;
    begin
      str := FloattoStr(temp);
    end;
      

  3.   

    floattoStr()
    是啊。
    就这么。
      

  4.   

    var
      str:string;
      temp:real;
    begin
      str := FloattoStr(temp);
    end;
    这位仁兄写的就完全可以。
      

  5.   

    Str:=FloatToStr(Temp)
    Str:=FormatFloat('0.000',Temp)