哈,是啊,这段我看过了,不得其法,参数全试过了,没解决代码如下<br>unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs, StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> procedure FormCreate(Sender: TObject);<br> procedure FormClose(Sender: TObject; var Action: TCloseAction);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br>type<br> pTest = ^ rTest;<br> rTest = packed record<br> x : string[120];<br> y : integer;<br> end;<br><br>var<br> Form1: TForm1;<br> al : Tlist;<br> bl : Tlist;<br> cl : Tlist;<br> dl : Tlist;<br> all : Tlist;<br><br>implementation<br><br>{$R *.dfm}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> rt : rTest;<br> i : integer;<br>begin<br> rt.x := '123';<br> rt.y := 123;<br> for i := 0 to 9 do begin<br> al.Add(@rt);<br> end;<br> rt.x := 'ddd';<br> rt.y := 999;<br> for i := 0 to 9 do begin<br> bl.Add(@rt);<br> end;<br> for i := 0 to 9 do begin<br> cl.Add(@rt);<br> end;<br> for i := 0 to 9 do begin<br> dl.Add(@rt);<br> end;<br> all.Assign(al,laOr);<br>// all.Assign(bl,laOr);<br>// all.Assign(bl,laand);<br>// all.Assign(cl,lacopy,all);<br>// all.Assign(dl,lacopy,all);<br> showmessage(inttostr(all.count));<br>end;<br><br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br> al := Tlist.Create ;<br> bl := Tlist.Create ;<br> cl := Tlist.Create ;<br> dl := Tlist.Create ;<br> all := Tlist.Create ;<br>end;<br><br>procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);<br>begin<br> al.Free ;<br> bl.Free ;<br> cl.Free ;<br> dl.Free ;<br> all.Free ;<br>end;<br><br>end.