procedure TForm1.Button1Click(Sender: TObject);
var
f:file;
begin
AssignFile(f,'c:\1\1.txt');
try
Rewrite(f);
finally
CloseFile(f);
end;
showmessage('ok');
end;按下button1后,如果'c:\1\1.txt'不存在,会出现一个I/O ERROR 103的错误,而showmessage语句没有执行,为什么?是不是要屏蔽I/O ERROR?怎样屏蔽?
多谢!
var
f:file;
begin
AssignFile(f,'c:\1\1.txt');
try
Rewrite(f);
finally
CloseFile(f);
end;
showmessage('ok');
end;按下button1后,如果'c:\1\1.txt'不存在,会出现一个I/O ERROR 103的错误,而showmessage语句没有执行,为什么?是不是要屏蔽I/O ERROR?怎样屏蔽?
多谢!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货