[fpc-pascal] PAS2JS: operations with array of record
Michael Van Canneyt
michael at freepascal.org
Thu Jan 11 11:57:06 CET 2018
On Thu, 11 Jan 2018, Sven Barth via fpc-pascal wrote:
> Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" <
> fpc-pascal at lists.freepascal.org>:
> Anyway, what I couldn't find is the built-in kind of *pseudo-methods for
> the record data type*, set of operations, for inserting, removing, sorting
> and otherwise manipulate the content, for instance:
> Don't you mean "pseudo-methods for the array data type"?
> In addition to *Low*, *High*, *Length* and *Count*,
> I suppose that the standard Pascal way of using SetLength() is used to add
> elements. Maybe also the "+" operator (not know if that already got
> implemented for arrays; in FPC it is still missing for now). Also it could
> be that Insert(), Delete(), Concat() and Concat() already support arrays
> as well in addition to strings (like FPC itself does).
Except the SetLength() one, none of these methods is supported yet.
The easiest currently is to do a TJSArray(myarray).push(myelement)
More information about the fpc-pascal