showmessage(FormatFloat('#.00',[edit1.text])

解决方案 »

  1.   

    试试这样:showmessage(formatfloar('#.00',edit1.text))
      

  2.   

    应改为:showmessage(FormatFloat('#.00',StrToFloat(edit1.text)));FormatFloat函数的原型:
    function FormatFloat(const Format: string; Value: Extended): string;
      

  3.   

    改为showmessage(FormatFloat('#.00',StrToFloatDef(edit1.text, 0.0)));绝对不会出错
      

  4.   

    showmessage(FormatFloat('#.00',[StrToFloat(edit1.text)])
      

  5.   

    错误提示
    [Error] notUnit1.pas(195): ',' or ':' expected but '(' found
    [Error] notUnit1.pas(195): ',' or ')' expected but '(' found
    [Error] notUnit1.pas(195): ',' or ')' expected but '(' found
    [Error] notUnit1.pas(195): ';' expected but ']' found
    [Fatal Error] Project1.dpr(8): Could not compile used unit 'notUnit1.pas'
      

  6.   

    showmessage(FormatFloat('#.00',[StrToFloat(edit1.text)]));
      

  7.   

    showmessage(FormatFloat('#.00',strtofloat(edit1.text)));