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. ==== STKDROP ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Drop a snapshot from the top of the Undo stack </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^ | | **→** | | | //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 || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''STKDROP'' command deletes the snapshot on the top of the Undo stack and subsequently all remaining snapshots drop one place. The command has little utility in interactive mode, because before ''STKDROP'' is executed a snapshot of the stack is pushed on the Undo stack: the only effect of ''STKDROP'' would be to delete the copy that was just made, leaving the Undo stack unchanged (except for the fact that its level 8 would have been lost in the process). </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> « "ABC" STKPUSH CLEAR 123 456 789 STKPUSH CLEAR 999 STKDROP STKPOP » </code> creates the following stack (before ''STKDROP'' is executed) <code> 1: 999 …………………………………………………………………………………… </code> The effect of ''STKPOP'' is to replace it with <code> 1: "ABC" …………………………………………………………………………………… </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_stkdrop.txt Last modified: 2019/11/03 15:17by jojo1973