==== STKPOP ==== ---- ---- Pop a snapshot from the Undo stack onto the current stack ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^^^ | | **→** | **On** | **...** | **O1** | | //Level 1// | //→// | //Level n// | //...// | //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 ''STKPOP'' command clears current stack and replaces it with a snapshot recalled from the top of the Undo stack. Subsequently the snapshot is removed from the Undo stack and all remaining snapshots drop one place. 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 already pushed on the Undo stack: the only effect of ''STKPOP'' would be to overwrite the current stack with a snapshot of itself. ---- This command is new in newRPL and does not exist in userRPL. ---- The following program « 123 456 789 STKPUSH CLEAR 999 STKPOP » creates the following stack (before ''STKPOP'' is executed): 1: 999 …………………………………………………………………………………… The effect of ''STKPOP'' is to replace it with 3: 123 2: 456 1: 789 …………………………………………………………………………………… ---- {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}