//看看以下代码,怎么总是出错,请高手来看看,谢谢!!!!!我很急!
总显示错雾[Error] ServerDM.pas(127): There is no overloaded version of 'IntToStr' that can be called with these arguments
请问怎么回事?,我把小时改为2,就没有错误了,请问为什么用1.5时有问题?
//检测时间,得到收费信息,一小时1.5,一分钟2.3分
var
BeginDateTime,BeginTime,NowTime,UseTime :TDateTime;
TimeStr:string;
TimeInteger:integer;
costMoney:String;
const RMB = '¥';
begin
JudgeStr := Copy(Timestr,3,1);
if JudgeStr =':' then
begin
HourStr := Copy(Timestr,1,2);
MinuteStr := Copy(Timestr,4,2);
costMoney := inttoStr(strtoint(HourStr)*1.5+strtoint(MinuteStr)*2.3);
end
else begin
HourStr := Copy(Timestr,1,1);
MinuteStr := Copy(Timestr,3,2);
costMoney := inttostr(strtoint(HourStr)*1.5+strtoint(MinuteStr)*2.3);
ServerMainForm.Label5.Caption :=RMB+costMoney;
end;
end;
总显示错雾[Error] ServerDM.pas(127): There is no overloaded version of 'IntToStr' that can be called with these arguments
请问怎么回事?,我把小时改为2,就没有错误了,请问为什么用1.5时有问题?
//检测时间,得到收费信息,一小时1.5,一分钟2.3分
var
BeginDateTime,BeginTime,NowTime,UseTime :TDateTime;
TimeStr:string;
TimeInteger:integer;
costMoney:String;
const RMB = '¥';
begin
JudgeStr := Copy(Timestr,3,1);
if JudgeStr =':' then
begin
HourStr := Copy(Timestr,1,2);
MinuteStr := Copy(Timestr,4,2);
costMoney := inttoStr(strtoint(HourStr)*1.5+strtoint(MinuteStr)*2.3);
end
else begin
HourStr := Copy(Timestr,1,1);
MinuteStr := Copy(Timestr,3,2);
costMoney := inttostr(strtoint(HourStr)*1.5+strtoint(MinuteStr)*2.3);
ServerMainForm.Label5.Caption :=RMB+costMoney;
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货