Output.printString error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Output.printString error

test257
Was it confirmed that this (https://github.com/nand2tetris/web-ide/issues/542) is indeed a bug of the web IDE?

While I was working (trying to figure it out) on it, I noticed that the built-in Output.printString shows a different screen if I just swap the fields of my String implementation.
To clarify, in one implementation I have

field Array arr;
field int maxLen, length;

and the screen of my Main.jack shows this

----------
|  abcd|
----------

If I just swap the order of the fields like this

field int maxLen, length;
field Array arr;

with everything else the same, the screen is shown with one character less

----------
|  abc|
----------

I have attached a Minimum Reproducible Example with testA and testB. Would be awesome if someone could confirm (or disprove) that github issue. Thanks!

Desktop.zip
Reply | Threaded
Open this post in threaded view
|

Re: Output.printString error

WBahn
Administrator
Thanks for the bug report. I'll try to delve into it to reproduce it, but I don't know when I will get around to it. If I can reproduce it (and run a few other tests to tease out what I can), I'll pass the info along to the authors. Given everything going on in that part of the world, I don't know how much time they will have to get around to looking at it, either.