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. ==== DUPN ==== ---- <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Duplicate a group of N objects on the stack </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^^^^^^ ^ __Output Stack__ ^^^^^ | **O<sub>n</sub>** | **O<sub>n-1</sub>** | **...** | **O<sub>2</sub>** | **O<sub>1</sub>** | **I<sub>n</sub>** | **→** | **O<sub>n</sub>** | **O<sub>n-1</sub>** | **...** | **O<sub>2</sub>** | **O<sub>1</sub>** | | //Level n+1// | //Level n// | //...// | //Level 3// | //Level 2// | //Level 1// | //→// | //Level 2n// | //Level 2n-1// | //...// | //Level 2// | //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**| None || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''DUPN'' command creates duplicates of objects from level 2 to level N+1 of the stack. </callout> <callout type="success" icon="true" title="Compatibility"> ---- This command is fully compatible with userRPL. </callout> <callout type="info" icon="true" title="Usage"> ---- <code> 5: ∡60° 4: "This is a string" 3: { 'X' 'Y' 'Z' } 2: 1_m 1: 3 …………………………………………………………………………………… DUPN </code> will result in <code> 7: ∡60° 6: "This is a string" 5: { 'X' 'Y' 'Z' } 4: 1_m 3: "This is a string" 2: { 'X' 'Y' 'Z' } 1: 1_m …………………………………………………………………………………… </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_dupn.txt Last modified: 2019/10/22 14:57by jojo1973