2010/5/6 spir ☣ <denis.s...@gmail.com>:
> (By the way, started playing with TFPList already, and could not find how to 
> get data back! I mean the symtric of add(). Even tried indexing (who knows, 
> with the syntactic magic of modern language? ;-).)

It is indexing.

var
  l: TFPList;
  p: Pointer;
  index: Integer;
begin
  l := TFPList.Create;
  index := l.Add(p);
  p := l[index];
end;

You can use it like an array too:

var
  l: TFPList;
begin
  l := TFPList.Create;
  l.Count := 20;
  // now you have l[0]..l[19] elements for read/write
end;


--
cobines
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to