E: RPN: The Stack 269
File name : 17BII-Plus-Manual-E-PRINT-030709 Print data : 2003/7/11
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
E
2
E
3
E
4). 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 X-register rotates around into the
T-register. Notice that the contents of the registers are rolled, while the
registers themselves maintain their positions. The calculator displays
only the X-register.
Variable Stack Size. Clearing the stack by pressing
@c
reduces
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 Y-Registers in the Stack
Another function that manipulates the stack contents is
x
(x exchange
y), located on the
)
key. It swaps the contents of the X- and Y-registers
without affecting the rest of the stack. Pressing
x
again restores the
original order of the contents. While in RPN mode you don’t need to
press the shift key for
x
.