[fpc-pascal] PAS2JS: operations with array of record

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jan 11 13:32:56 CET 2018

On Wed, 10 Jan 2018 11:40:48 -0700 (MST)
warleyalex via fpc-pascal <fpc-pascal at 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.


More information about the fpc-pascal mailing list