[fpc-pascal] about dynamic array -- PS

spir ☣ denis.spir at gmail.com
Thu May 6 12:03:35 CEST 2010


It seems the actual issue with static array is that the size is part the type. So that one cannot even use a pointer to refer to an array which size is supposed to change (since the pointer's type itself would be constrained by the size). Is this correct?
If yes, how is it possible to build a "flexible" array type (in which on can add/remove elements) on top of static array?

Also, a side-question: is resizing a flexible array more efficient than reallocating and copying a static one (provided the above issue is solved)?
(I intend to do tests, but fpc's site seems to be down? I need info about timing funcs.)


vit esse estrany ☣


More information about the fpc-pascal mailing list