Function readtextfil(filename:string):Boolean;
Var
s,s1:string;
F:textfile;
begin
if filename = '' then
begin
result:=false;
exit;
end;
AssignFile(F,filename);
Reset(F);//here occur error
while not eof(F) do
begin
readLn(F,s);
....
end;
end;
CloseFile(F);
end;
Function readtextfil(filename:string):Boolean;
Var
s:string;
F:textfile;
begin
if filename = '' then
begin
result:=false;
exit;
end;
AssignFile(F,filename);
Reset(F);//here occur error
while not eof(F) do
begin
readLn(F,s);
....
end;
CloseFile(F);
end;