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

Z Y X

1

2

3

4

~

4

1

2

3

~

3

4

1

2

~

2

3

4

1

~

1

2

3

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 @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 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 xagain restores the original order of the contents. While in RPN mode you don’t need to press the shift key for x.

E: RPN: The Stack 269

File name : 17BII-Plus-Manual-E-PRINT-030709

Print data : 2003/7/11

Page 269
Image 269
HP 17bII manual Reviewing the Stack Roll Down, Exchanging the X- and Y-Registers in the Stack