[lazarus] More of a FPC question but... dynamic arrays

Tony Maro tonym at nlisc.com
Sun Sep 29 21:05:35 EDT 2002


In Delphi 4 I used dynamically sized arrays using setlength to resize
them as needed.

I haven't been able to get it to work in FPC / Lazarus, and it looks
like the setlength function isn't there.  In fact, defining the array
using:

var
	MyArray: array of TObject;

Doesn't work either...

This was a feature they added in Delphi 4.  I've got over 60,000 lines
of code that rely heavily on this that I was looking to migrate to
Lazarus.

Have I just missed something, or must I write my own linked list manager
or use a TCollection to get this to work?

Thanks,
Tony






More information about the Lazarus mailing list