Either to understand why an error message occurred, or just to see how Hypatia processes a calculation line, you can add a space and a question mark at the end of the calculation.
This question mark puts Hypatia in "debugging mode", which only applies to this line.
Here is a simple example without an error to show what debugging mode looks like (the question mark at the beginning is Hypatia's input prompt, you do not type it):
? 3 SQ 4 SQ + SQRT ?
[ op: sq | result: 9 | position: 1 ]
[ op: sq | result: 16 | position: 2 ]
[ op: + | result: 25 | position: 1 ]
[ op: sqrt | result: 5 | position: 1 ]
= 5
Each line shows the operator, followed by its result, and the result's position in the stack (that is, the calculation input line as it gets processed).
The result of the last operator must be in position 1, that is, it must be the only remaining element in the stack, otherwise the calculation ends with an error.
You will usually want to use debugging mode after an error has occurred.
For this, you press the ARROW UP key to go back to the previous input line that returned the error message, press the END key to go to its end, type a space and a question mark, end press the ENTER key.
You can, of course, if you already suspect what caused the error, try to fix that first.
Another method to re-run a calculation in debugging mode is to enter (hyin) ? -- this will be explained in the context f insert files.
In a loop, the debug question mark is ignored.
Home, Up: First Steps, Prev: Chain Calculations, Next: Copy to Clipboard