定义了一个double类型,Money(代表输入的金额)。
根据EDIT的输入对Money赋值:Money:=StrToIntDef(Edit_PutInMoney.Text);
结果出现NOT enough actual parameters这个错误!这是怎么回事啊?

解决方案 »

  1.   

    将double转换为string类型。可用直接用floattostr();
    将string转换为double类型.用strtofloat
      

  2.   

    少了一個參數,Money:=StrToIntDef(Edit_PutInMoney.Text, 0); 
    才是OK的,
    或都 你這樣寫  Money:=StrToInt(Edit_PutInMoney.Text); 
      

  3.   

     你定義的是DOUBLE類,應該是Money:=StrToFloatDef(Edit_PutInMoney.Text, 0); 
    或 Money:=StrToFloat(Edit_PutInMoney.Text); 
      

  4.   

    参数类型不够,既然你定义的是double就该用StrToFloatDef(Edit_PutInMoney.Text, 0);