[fpc-pascal] Pre-allocated TFPGList or similar

Ryan Joseph genericptr at gmail.com
Sun Nov 24 15:22:09 CET 2019



> On Nov 24, 2019, at 3:57 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> What you're looking for is the Count property. Setting it is supported by the untyped lists in Classes, the generic ones in FGL as well as those in Generics.Collections.
> 
> === code begin ===
> 
> list := TList.Create;
> list.Count := 10;
> list[5] := someItem;

I was trying that but with capacity and not count. Thanks.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list