Am 11.01.2018 13:33 schrieb "Mattias Gaertner" <nc-gaert...@netcologne.de>:
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote: >[...] > · Add(item [,...]) / Push(item [,...]) : increases Length by one and adds one or more item at the end of the array, can also add arrays (concatenation). > > · Clear() : empties the array (equivalent to SetLength(0)) > > · Copy(startIndex[, count]) : creates a new dynamic array containing count items from startIndex, if count isn't specified, copies to the end of the array. > [...] There are the usual Pascal array functions, like setlength, copy, insert, delete and concat. You can also type cast the array to JSArray from unit js, which gives you all the JS functions. And when eventually type helpers are implemented, functions can be added to Pascal arrays. The problem with helper types is that you can't add them for all array types at once, but only for a specific one (and even then - at least in Delphi and FPC - you can't use "array of X", but need to use an explicit array type). Especially with the concept of type helpers already existing it makes sense to think about "built in methods" for arrays... Regards, Sven
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal