==== ROLL ====
----
----
Move object at level N to level 1
----
^ __Input Stack__ ^^^^ ^ __Output Stack__ ^^^^
| **On** | **...** | **O1** | **In** | **→** | **On-1** | **...** | **O1** | **On** |
| //Level n+1// | //...// | //Level 2// | //Level 1// | //→// | //Level n// | //...// | //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 ||
----
The ''ROLL'' command moves the object on the specified level of the stack (i.e. the (N+1)-th level, since level 1 contains N) to the first level of the stack, lifting the other objects accordingly.
----
This command is fully compatible with userRPL.
----
6: ∡60°
5: 123
4: "This is a string"
3: { 'X' 'Y' 'Z' }
2: 1_m
1: 4
……………………………………………………………………………………
ROLL
will result in
5: ∡60°
4: "This is a string"
3: { 'X' 'Y' 'Z' }
2: 1_m
1: 123
……………………………………………………………………………………
----
{{page>manual:chapter6:stack&nofooter&noeditbtn&inline}}