N
noall
Unregistered / Unconfirmed
GUEST, unregistred user!
rt.
问题例子如下:
procedure TfrmMain.BitBtn2Click(Sender: TObject);
var K:tstrings;
function abc(ab:string):tstrings;
var a:tstrings;
begin
a:=tstringlist.Create;
a.Add(ab);
result.Assign(a);//如何将a列表赋给函数值呢?
a.free;
end;
begin
k:=tstringlist.Create;
try
k:=abc('a');
finally
k.Free;
end;
end;
问题例子如下:
procedure TfrmMain.BitBtn2Click(Sender: TObject);
var K:tstrings;
function abc(ab:string):tstrings;
var a:tstrings;
begin
a:=tstringlist.Create;
a.Add(ab);
result.Assign(a);//如何将a列表赋给函数值呢?
a.free;
end;
begin
k:=tstringlist.Create;
try
k:=abc('a');
finally
k.Free;
end;
end;