FloatToStr(value),转化的字符小数点后面很长。
Format('%.2f',value);

解决方案 »

  1.   

    FloatToStr函数把一个浮点转换成一个字符串,所使用的格式是有15位精确度的通用格式;*******************************************************************************
    FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer):
      string;
    type TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency);
    *******************************************************************************
    FloatToStrF函数把浮点数Value转换成一个格式化了的字符串。Format参数决定这个数字是
    如何转化的。Precision决定有效数字的个数,而Digits则表示小数点后保留多少位。对于
    格式化了的字符串要使用DecimalSeparator,而且还需要ThousandSeparator。