
Exceptions
The Interpreter Stack
The NewtonScript bytecodes are instructions for a virtual machine. This machine is stack-based. Values are pushed onto the stack and popped off. There are three debugging functions that deal with the interpreter stack.
GetAllTempVars(stackLevel);
This routine displays the contents of the interpreter stack for the function at the specified stack level.
GetTempVar(stackLevel, offset);
This routine returns the contents of a particular element from the interpreter stack for the function at the specified stack level. An offset of 0 is the element at the top of the stack.
SetTempVar(stackLevel, offset, newValue);
This routine changes the contents of a particular element from the interpreter stack for the function at the specified stack level.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996