==== STKPICK ====
----
----
Pick an object from a snapshot in a given level of the Undo stack
----
^ __Input Stack__ ^^ ^ __Output Stack__ ^
| **Isnapshot** | **Ilevel** | **→** | **O** |
| //Level 2// | //Level 1// | //→// | //Level 1// |
{{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}}
|**Type**| [[manual:chapter5:basics#commands|Command]] ||
|**Parallel list processing**| [[manual:chapter5:listproc#group-1commands-that-cannot-parallel-process|Group 1]] ||
|**Affected by flags**| None ||
----
The ''STKPICK'' command retrieves an object at a given level from a given snapshot on the Undo stack.
The command has little utility in interactive mode, since each time a command is typed and ''[[manual:chapter6:operators:cmd_ovr_xeq|XEQ]]''ted a snapshot of the stack is pushed on the Undo stack, altering the position of the intended snapshot.
----
This command is new in newRPL and does not exist in userRPL.
----
The following program
« 10 11 12 13
STKPUSH
CLEAR
"ABC"
STKPUSH
CLEAR
2 3 STKPICK
»
will ''[[manual:chapter6:stack:cmd_pick|PICK]]'' the third element (level 1 argument) from snapshot on level 2 (Level 2 argument) of the Undo stack, resulting in the number ''11'' being left on the current stack.
----
{{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}