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

Martin Schreiber mse00000 at gmail.com
Sun Dec 4 11:24:19 CET 2016


On 12/04/2016 10:43 AM, Graeme Geldenhuys wrote:

> The code I'm working on often needs a list of integers (actually uint16,
> int16 etc, but Integer should do). I would normally use an array, but I
> have no idea how many items I'll need beforehand.

As an alternative to the FPC lists MSEgui provides the TDatalist
hierarchy in lib/common/kernel/msedatalist.pas. For simple cases there
is also lib/common/kernel/msearrayutils.pas with functions for dynamic
arrays with an optional "count" parameter.

Martin


More information about the fpc-pascal mailing list