delphi 将word转换成string
我的代码是这样的:varcolindex:Integer;wordHou,i:word;sQian,sHou,s:string;qian,hou,strNum:Longi...
我的代码是这样的:
var
colindex:Integer;
wordHou,i:word;
sQian,sHou,s:string;
qian,hou,strNum:Longint;
begin
s:=edt1.Text ;
wordHou:=pos('-',s);
sQian:=copy(s,1, wordHou-1 );
sHou:=copy(s, wordHou+1, length(s) );
qian:=strToInt(sQian);
hou :=strToInt(sHou);
end;
for i:=qian to hou do
strNum:=inttostr(i);
......
这是一部分,但就是会报
[Error] main.pas(354): Incompatible types: 'Integer' and 'String'
这样的错误。 展开
var
colindex:Integer;
wordHou,i:word;
sQian,sHou,s:string;
qian,hou,strNum:Longint;
begin
s:=edt1.Text ;
wordHou:=pos('-',s);
sQian:=copy(s,1, wordHou-1 );
sHou:=copy(s, wordHou+1, length(s) );
qian:=strToInt(sQian);
hou :=strToInt(sHou);
end;
for i:=qian to hou do
strNum:=inttostr(i);
......
这是一部分,但就是会报
[Error] main.pas(354): Incompatible types: 'Integer' and 'String'
这样的错误。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询