procedure TForm1.cmdMakeClick(Sender: TObject);
var
mycomputer,s :string;
i : integer;
begin
mycomputer:='';
for i:=1 to length(tbmac.Text) do
begin
s:=midstr(tbmac.Text,i,1);
mycomputer:=mycomputer+IntToStr(ord(s)); --报 incompatible types 错
showmessage(mycomputer);
end;
end;在上面程序片断中会报一个错,而如果把有错的那句改成mycomputer:=mycomputer+IntToStr(ord('a'))
就不会报错难道ord函数中的参数不能是变量吗?
var
mycomputer,s :string;
i : integer;
begin
mycomputer:='';
for i:=1 to length(tbmac.Text) do
begin
s:=midstr(tbmac.Text,i,1);
mycomputer:=mycomputer+IntToStr(ord(s)); --报 incompatible types 错
showmessage(mycomputer);
end;
end;在上面程序片断中会报一个错,而如果把有错的那句改成mycomputer:=mycomputer+IntToStr(ord('a'))
就不会报错难道ord函数中的参数不能是变量吗?
解决方案 »
- delphi 发展前景如何
- 大富翁又可以访问了
- 关于TEmbeddedWB的问题
- 我明明用了这个变量,为什么还出现 Value assigned to 't' never used的提示?
- 关于FindChildControl方法,马上揭帖!!!!
- 文件拖放操作的问题
- 谁知道怎样控制window中的图像处理程序的打开、保存、关闭啊?
- Delphi7 Access violation at address问题
- :★★★难度实在太大:如何将字体为'Fixedsys'的英文文本输出到打印机? ★★★
- www.pcjingning.com的新动态:whf版主有一珍藏的“模拟屏查询系统”有4M大,有人要的话就传上去大家下载。需要的朋友请留言。
- dbgrid的列标题如何改名
- 窗体调用的小问题,在线等呀.
s : char