As alternative you can use https://github.com/dathox/generics.collections
(requires FPC 3.0).
You can use TList<> from Generics.Collections, is much simpler in usage:
======code begin======
type
TIntegerList = specialize TList<Integer>;
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
il: TIntegerList;
begin
il:= TIntegerList.Create;
il.add(5);
il.Add(3);
il.add(8);
il.Add(2);
il.add(2);
il.Add(1);
ListBox1.Clear;
for i:= 0 to il.Count - 1 do
ListBox1.Items.Add(IntToStr(il[i]));
il.Sort();
ListBox2.Clear;
for i:= 0 to il.Count - 1 do
ListBox2.Items.Add(IntToStr(il[i]));
il.Free;
end;
======code end======
--
Best regards,
Maciej Izak
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus