[fpc-pascal] List of integers? Any class available in RTL or FCL to help?

Florian Klämpfl florian at freepascal.org
Sun Dec 4 11:06:09 CET 2016

Am 04.12.2016 um 10:46 schrieb Graeme Geldenhuys:
> On 2016-12-04 09:43, Graeme Geldenhuys wrote:
>> I would still like to hear of the RTL or FCL has other container I could
>> use.
> I forgot to mention, I also need the following additional functionality
> for such a container. Sorting and Ignore Duplicates.

You mean you want allow duplicates? Then you should have a look at TFPGList, even if you do not like
generics. TFPGList is our approach to extend FPC carefully with generics. As it is written in objfpc
mode, you are forced not to clutter your code with specializations but you do once a TInt8List =
specialize TFPGList<Int8> etc. and continue to use TInt8List. Further, TFPGList is a
wrapper/anchestor around TFPSList, so each specialization does not explode into another full TList
like implementation: a lot of code is shared by all specializations of TFPGList.

More information about the fpc-pascal mailing list