This is an old revision of the document!
STKPICK
Description
Copy an object from a snapshot in a given level of the “stack of stacks” onto the current stack. Similar to PICK but selecting which snapshot to pick from.
Stack Diagram
| Input Stack | Output Stack | |
|---|---|---|
| Isnapshot Ilevel | → | O |
| Level 2 Level 1 | → | Level 1 |
| Support for inclusion in symbolic expressions |
| Support for parallel list processing |
| Affected by flags |
Compatibility
This command is new in newRPL, does not exist in userRPL.
Usage
The following program:
« 10 11 12 13 STKPUSH CLEAR 1 3 STKPICK »
the code will PICK the third element (Level 1 argument) from snapshot on level 1 (Level 2 argument) of the “stack of stacks”, resulting in the number 11 being left on the current stack.
Related Commands
| Command | Short Description | |
|---|---|---|
| CLEAR | Remove all objects from the stack | |
| DEPTH | Get the current stack depth | |
| DROP | Remove an object from the stack | |
| DROP2 | Remove two objects form the stack | |
| DROPN | Remove N objects from the stack | |
| DUP | Duplicate an object on the stack | |
| DUP2 | Duplicate two objects on the stack | |
| DUPDUP | Duplicate the same object twice on the stack | |
| DUPN | Duplicate a group of N objects | |
| NDUPN | Replicate one object N times and return N | |
| NIP | Remove object at level 2 on the stack | |
| OVER | Duplicate object at level 2 on the stack | |
| PICK | Duplicate object at position N on the stack | |
| PICK3 | Duplicate object at level 3 on the stack | |
| ROLL | Move object at level N to level 1 | |
| ROLLD | Move object from level 1 to level N | |
| ROT | Move object from level 3 to level 1 | |
| SWAP | Exchange objects in levels 1 and 2 | |
| UNPICK | Move object from level 1 to level N. | |
| UNROT | Move object from level 1 to level 3 | |
| IFT | Evaluate objects on the stack conditionally | |
| IFTE | Evaluate objects on the stack conditionally | |
| STKPUSH | Push a snapshot of the current stack on the undo stack | NEW |
| STKPOP | Pop a stack snapshot from the undo stack | NEW |
| STKDROP | Drop a snapshot from the undo stack | NEW |
| STKPICK | Copy snapshot in level N to the current stack | NEW |
| STKDEPTH | Get the depth of the undo stack | NEW |