生成数组, 然后转换成链表结构, 然后遍历这个链表 , 但链表最后一个确读不出来, why?-----
type
intClass = class
public
index : integer;
next :^intClass;
end;type
arrayintClass = array of intClass;
..........
function getClassList:intClass; 
var ic : arrayintClass;
i : integer;
begin
setlength(ic,5);
i := 0;
while i<=high(ic) do
begin
ic[i] := intClass.Create;
ic[i].index := random(500);
ic[i].next := nil;
i := i+1;
end;
i := 0;
while i<high(ic) do // trans array type to link type
begin
ic[i].next := @ic[i+1];
i := i+1;
end;
result := ic[0];
end;procedure TForm1.Button1Click(Sender: TObject);
var tem : arrayintClass;
i : integer;
begintem := getClassList;
i := 0;
self.Memo1.Clear;
while tem <> nil do
begin
inc(i);
self.Memo1.Lines.Add(inttostr(i)+'--'+inttostr(tem.index));
tem := @tem.next;end;