Reviewing the Stack (Roll Down)
The ~(roll down) function (on the (key) lets you review the entire contents of the stack by “rolling” the contents downward, one register at a time. While in RPN mode you don’t need to press the shift key for ~.
The ]key has the same effect as ~. except in a CFLO or SUM list, when ]affects the list and not the stack. Likewise, the [key rolls the contents of the stack upward, except in lists.
Rolling a Full Stack. Suppose the stack is filled with 1, 2, 3, 4 (press 1 E2 E3 E4). Pressing ~four times rolls the numbers all the way around and back to where they started:
T | 1 |
| 4 |
| 3 |
| 2 |
| 1 |
Z | 2 |
| 1 |
| 4 |
| 3 |
| 2 |
Y | 3 |
| 2 |
| 1 |
| 4 |
| 3 |
X | 4 | ~ | 3 | ~ | 2 | ~ | 1 | ~ | 4 |
When you press ~, the value in the
Variable Stack Size. Clearing the stack by pressing @creduces the stack to one register (X) with a zero in it. As you enter numbers, the stack builds up again. The ~and [functions roll through as many registers as currently exist (one, two, three, or four).
Exchanging the X- and
Another function that manipulates the stack contents is x(x exchange y), located on the )key. It swaps the contents of the X- and
E: RPN: The Stack 269
File name :