楼主确实对 TList 了解不够。不过你要把 TList 所指的内容写到文件里,可以参考下面的片断:
type
TRec = record
n: Integer;
f: Double;
end;
PRec = ^TRec;
var
l: TList;
i: Integer;
p: PRec;
f: file of TRec;
begin
l := TList.Create;
for i := 0 to 3 do
begin
New(p);
p.n := 100 * (i + 1);
p.f := 1 / p.n;
l.Add(p);
end;
AssignFile(f, 'd:/a.txt');
Rewrite(f);
for i := 0 to l.Count - 1 do
Write(f, TRec(l.Items^));
CloseFile(f);
for i := l.Count - 1 to 0 do
Dispose(l.Items);
l.Destroy;
end;