You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The VM emulator throws ERR14 when working with an empty string.
Reproduction steps:
paste the following code into a Main.jack file in the jack compiler:
class Main {
function void main() {
var String empty;
let empty = "";
return;
}
}
Click "Compile", then click "Run"
When the VM emulator opened up, press the [>>] button to start the simulation
Workaround:
Since strings start empty and only contain characters, when they are appended using the String.appendChar(c) function, you can create an empty string with let empty = String.new(1);.
Additional Comments
No response
Do you want to try to fix this bug?
I want to try to add this feature!
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Tool
VM Emulator
Interface
Website (https://nand2tetris.github.io/web-ide)
Contact Details
[email protected]
What happened?
The VM emulator throws ERR14 when working with an empty string.
Reproduction steps:
Workaround:
Since strings start empty and only contain characters, when they are appended using the String.appendChar(c) function, you can create an empty string with
let empty = String.new(1);
.Additional Comments
No response
Do you want to try to fix this bug?
Code of Conduct
The text was updated successfully, but these errors were encountered: