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. ==== DROP2 ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Remove two objects from the top of the stack </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^^ ^ __Output Stack__ ^ | **O<sub>2</sub>** | **O<sub>1</sub>** | **→** | | | //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-2commands-that-must-use-dolist-to-parallel-process|Group 2]] || |**Affected by flags**| [[manual:appendix:flags#flag-28|-28]] | RPL / RPN stack mode | |:::| [[manual:appendix:flags#flag-29|-29]] | RPN stack depth | </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''DROP2'' command deletes the top two objects on the stack, shifting the remaining ones by two levels. When the stack is in RPN mode ''DROP2'' fills immediately the two bottom-most level of the stack (levels 3/4 or levels 7/8, depending on the selected stack depth) with the value stored in the bottom-most level before the shift happened. </callout> <callout type="warning" icon="true" title="Compatibility"> ---- This command is only partially compatible with userRPL. In particular: * In userRPL RPN stack mode is not supported. </callout> <callout type="info" icon="true" title="Usage"> ---- <code> 3: "This is a string" 2: { 'X' 'Y' 'Z' } 1: 1_m …………………………………………………………………………………… DROP2 </code> will result in <code> 1: "This is a string" …………………………………………………………………………………… </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_drop2.txt Last modified: 2019/11/28 14:52by jojo1973