> On Apr 12, 2017, at 9:24 PM, Jürgen Hestermann <juergen.hesterm...@gmx.de> > wrote: > > SetLength(Array,Length(Array)+1); > > You will get an additional element (filled with zeros). > Then you can set > > Array[High(Array)] := whateveryouwant;
Well sure, but this kind of code is exactly what programmers abstract and reuse so it’s a perfect candidate for a function. SetLength(Array,Length(Array)+1); Array[High(Array)] := … In the real world is anyone actually going to type that out every time? I’d bet most of us have an array class we use and ignore dynamic arrays all together because we all need basic operations like “add” and “remove”. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal