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

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 13:33 schrieb "Mattias Gaertner" : On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal 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

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

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal 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 SetLen

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

2018-01-11 Thread Mattias Gaertner
On Wed, 10 Jan 2018 11:40:48 -0700 (MST) warleyalex via fpc-pascal wrote: > Since it's missing the Pas2JS specific forum, I don't know if here is correct > place to post things about "Pas2JS".  Hopefully there will be one soon. > I'm using it a lot and it's very promising. I came across with

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

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, Mattias Gaertner wrote: On Thu, 11 Jan 2018 11:44:30 +0100 Sven Barth via fpc-pascal wrote: Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@lists.freepascal.org>: Anyway, what I couldn't find is the built-in kind of *pseudo-methods for the record d

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

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, warleyalex via fpc-pascal wrote: Thanks a lot for the feedback. it worked as expected! The solution was: /* in DWScript world */var recA : JA;recB : JB;recC : JC;for var k:=0 to 2 do begin recC.id := k; recC.name := 'abc'+IntToStr(k); recC.age := 10+k; recB.fie

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

2018-01-11 Thread Mattias Gaertner
On Thu, 11 Jan 2018 11:44:30 +0100 Sven Barth via fpc-pascal wrote: > Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < > fpc-pascal@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 inserti

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

2018-01-11 Thread warleyalex via fpc-pascal
Thanks a lot for the feedback. it worked as expected! The solution was: /* in DWScript world */var recA : JA;recB : JB;recC : JC;for var k:=0 to 2 do begin recC.id := k; recC.name := 'abc'+IntToStr(k); recC.age := 10+k; recB.field1 := 'rec'+ IntToStr(k); recB.params.Add(recC); recA.fi

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

2018-01-11 Thread Michael Van Canneyt
On Thu, 11 Jan 2018, Sven Barth via fpc-pascal wrote: Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@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

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

2018-01-11 Thread Sven Barth via fpc-pascal
Am 11.01.2018 08:16 schrieb "warleyalex via fpc-pascal" < fpc-pascal@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

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

2018-01-10 Thread warleyalex via fpc-pascal
Since it's missing the Pas2JS specific forum, I don't know if here is correct place to post things about "Pas2JS".  I'm using it a lot and it's very promising. I came across with issue when dealing with array of records. I would like to convert this little piece of DWScript code to Pas2JS, unfor