J
jeansonliu
Unregistered / Unconfirmed
GUEST, unregistred user!
以下函数为什么出错?如何改?
function TFrmSearch.GetValue(Filename:string;var S:TStrings):boolean;
var
F:tstringlist;
i:integer;
begin
try
f:=tstringlist.create();
f.loadfromfile(filename);
for i:=0 to f.count-1 do
begin
s.Add(f);//出错
end;
result:=true;
except
result:=false;
end;
end;
function TFrmSearch.GetValue(Filename:string;var S:TStrings):boolean;
var
F:tstringlist;
i:integer;
begin
try
f:=tstringlist.create();
f.loadfromfile(filename);
for i:=0 to f.count-1 do
begin
s.Add(f);//出错
end;
result:=true;
except
result:=false;
end;
end;