Saturday, April 15, 2017

Nand2Tetris Common Issues

../../tools/JackCompiler.bat Fraction/

Compiling "C:\Users....\09\Fraction\"
Could not find file or directory: C:\Users..

Problem - the '/' provided along with directory name. Yes, lame, I know :) Shimon's response : our purpose is didactic, not production :)

while( 1 ) {

}

use while( true ) ...

Aha - API claims drawCircle can handle radius of 181... Nice try there. I just found out you have to stay below 128 (127 is ok)

In Circle.jack (line 23): In subroutine PlotCircle: Expected (

Most likely reason - you used a "do" when you meant to use "let" :) Don't you miss Perl's errors/warnings :) ?

Gotcha - you HAVE to declare ALL variables before any "action".

var int xyz;
let xyz = 0;
var int pqr;

won't fly :)

No comments:

Post a Comment