==== ADDROT ==== ---- Add elements to a list, keeping only the last N elements ---- ^ __Input Stack__ ^^^ ^ __Output Stack__ ^ | **Ldata** | **Oitem** | **Isize** | **→** | **Ldata-upd** | | //Level 3// | //Level 2// | //Level 1// | //→// | //Level 1// | {{page>manual:chapter6:aux:legend&nofooter&noeditbtn&inline}} | **Keyword type** | [[manual:chapter5:basics#commands|Command]] || | **Parallel list processing capabilities** | [[manual:chapter5:listproc#group-2commands-that-must-use-dolist-to-parallel-process|Group 2]] | //Commands that must use //''[[manual:chapter6:lists:cmd_cmddolist|DOLIST]]''// to parallel process// | | **Affected by flags** | //None// || ---- The ''ADDROT'' command adds element to a list just like the command ''[[manual:chapter6:lists:cmd_add|ADD]]'' does, but with a difference: if the list grows larger than **Isize** elements, the first one gets removed. ---- ''ADDROT'' is specific to **newRPL** and has no direct equivalent in **userRPL**. ---- **__Input__** 4: 3: { A B C } 2: X 1: 3 ………………………………………………………………………………………………………… ADDROT \\ **__Output__** 4: 3: 2: 1: { B C X } ………………………………………………………………………………………………………… ---- {{page>manual:chapter6:lists&nofooter&noeditbtn&inline}}