Show pageDiscussionOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ==== STKPOP ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Pop a snapshot from the Undo stack onto the current stack </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^^^ | | **→** | **O<sub>n</sub>** | **...** | **O<sub>1</sub>** | | //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 || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- 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. </callout> <callout type="danger" icon="true" title="Compatibility"> ---- This command is new in newRPL and does not exist in userRPL. </callout> <callout type="info" icon="true" title="Usage"> ---- The following program <code> « 123 456 789 STKPUSH CLEAR 999 STKPOP » </code> creates the following stack (before ''STKPOP'' is executed): <code> 1: 999 …………………………………………………………………………………… </code> The effect of ''STKPOP'' is to replace it with <code> 3: 123 2: 456 1: 789 …………………………………………………………………………………… </code> </callout> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> ---- {{page>manual:chapter6:stack&nofooter&noeditbtn&inline}} </callout> manual/chapter6/stack/cmd_stkpop.txt Last modified: 2019/10/22 15:24by jojo1973