There is no overloaded version of 'IntToStr' that can be called with these arguments是什么意思啊

ATCG 2003-07-29 02:50:12
当我执行 inttostr(int(一个double型的变量))时,出现如下提示,是什么意思啊?
There is no overloaded version of 'IntToStr' that can be called with these arguments
...全文
3067 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
fansnaf 2003-07-29
  • 打赏
  • 举报
回复
trunc取整数;
round四舍五入
geodgehoul 2003-07-29
  • 打赏
  • 举报
回复
那是你程序其他问题出错了巴,要不
var i :integer;
begin
showmessage(inttostr(i));
end
肯定是可以的啊
fansnaf 2003-07-29
  • 打赏
  • 举报
回复
同意楼上的;
是说:没有inttostr()的重载,因此不能使用该函数。
实际上是你的参数不对,
可以这样: inttostr(trunc(double型))
firetoucher 2003-07-29
  • 打赏
  • 举报
回复
inttostr(round(一个double型的变量))
ATCG 2003-07-29
  • 打赏
  • 举报
回复
请给个例子行吗,我没有用过
ATCG 2003-07-29
  • 打赏
  • 举报
回复
inttostr(一个整型变量); 也不行啊
只有这样才行:inttostr(100);
windofsun 2003-07-29
  • 打赏
  • 举报
回复
请注意Delphi里的Int函数,返回值是一个Extended类型

function Int(X: Extended): Extended;
ATCG 2003-07-29
  • 打赏
  • 举报
回复
那应该怎么给参数啊?
windofsun 2003-07-29
  • 打赏
  • 举报
回复
意思就是:虽然存在这个名称的函数,但参数类型或参数的个数不匹配
idilent 2003-07-29
  • 打赏
  • 举报
回复
你给参数不对

5,916

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧