就商的附值不是这样写的吗??Label11.Caption:=inttostr(strtoint(Edit2.Text)/2000);提示错误为:
There is no overloaded version of 'IntToStr' that can be called with these arguments
There is no overloaded version of 'IntToStr' that can be called with these arguments
调试欢乐多
实际上是你的参数不对,
可以这样: inttostr(trunc(double型))
trunc取整数;比如
procedure TForm1.Button1Click(Sender: TObject);
begin
Label11.Caption:=inttostr(trunc(strtoint(Edit2.Text)/2000));
end;
好象求不出商来!!总不可能9195/2000=0吧
再想想??
-----------------------------------------------------
大哥
你是先把str转变成int,然后再把int转换成str
有什么问题吗?如果你要得到你的想要的答案
那就直接
因该这样
Label1.Caption:=floattostr(strtofloat(Edit1.Text)/2000);
用floattostr而不是inttostr