M
Manish Gill
I've gotten started with the famous book. As of now, I'm stuck on an exercise in Chapter 4. I would really love if someone could provide some hints asto what I'm doing wrong and how can I improve the solution. The problem wants me to add some improvements (add variables) to the Polish calculator.
Here is what I have so far: http://bpaste.net/show/k1Eb8vDV7nSbOhpbzLDh/
The problem is in the handle_vars function. It's not really working the wayI want it to. Something like
10 a
a 3 +
will work, but it gets weird when I introduce another variable.
20 b
40 b +
Error: Stack empty.
I'll appreciate any help.
Thanks.
Here is what I have so far: http://bpaste.net/show/k1Eb8vDV7nSbOhpbzLDh/
The problem is in the handle_vars function. It's not really working the wayI want it to. Something like
10 a
a 3 +
will work, but it gets weird when I introduce another variable.
20 b
40 b +
Error: Stack empty.
I'll appreciate any help.
Thanks.