RosettaCodeData/Task/Collections/Pascal/collections-6.pascal
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

19 lines
349 B
Text

program ListDemo;
uses
classes;
var
MyList: TList;
a, b, c: integer;
i: integer;
begin
a := 1;
b := 2;
c := 3;
MyList := TList.Create;
MyList.Add(@a);
MyList.Add(@c);
MyList.Insert(1, @b);
for i := MyList.IndexOf(MyList.First) to MyList.IndexOf(MyList.Last) do
writeln (integer(MyList.Items[i]^));
MyList.Destroy;
end.