Re: how to print vm commands in correct order
Posted by kraftwerk1611 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/how-to-print-vm-commands-in-correct-order-tp4030962p4030971.html
Thank you so much for the reply.
Not talking about symbol table but let's say some other variable in first function is assigned a value in it. And then this value is used by fourth function down in the call chain. How can this fourth function d() can have access to the value in first function without this value being passed from a() to b() to c() and then to d(), if this value is not stored in some global variable.
I know this question is not directly related to this compiler code and I was initially hesitant to mention it. But I did face this issue couple of times when writing project 11 code and could not think of any other way to do it except using global variable.