[Pas2js] 2d array bug?
nick's hardware
nickshardware2020 at gmail.com
Wed Oct 6 00:16:49 CEST 2021
That's great! Thanks for confirming.
On Tue, 5 Oct 2021 at 16:26, Mattias Gaertner <nc-gaertnma at netcologne.de> wrote:
>
> On Tue, 5 Oct 2021 15:59:03 -0400
> "nick's hardware" <nickshardware2020 at gmail.com> wrote:
>
> > using Pas2JS Compiler version 2.0.6 [2021/04/15] for Win32 i386
> >
> > Program test;
> > uses browserconsole;
> >
> > type
> > ta = array[0..1,0..1] of integer;
> > var
> > a1 : ta;
> > a2 : ta;
> > begin
> > a1[0,0]:=10;
> > a1[0,1]:=10;
> >
> > //make a copy of array
> > a2:=a1;
> >
> > //modify the copy
> > a2[0,0]:=99;
> > a2[0,1]:=99;
> >
> > //print contents of original array - it should print 10 10 - but it
> > prints 99 99 //this works normally with single dimension array. have
> > not tested with three dimensional
> > writeln(a1[0,0]);
> > writeln(a1[0,1]);
> > end.
>
> This has been fixed last week in the development version of pas2js.
>
> Mattias
>
> _______________________________________________
> Pas2js maillist - Pas2js at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js
More information about the Pas2js
mailing list