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. ==== ΣLIST ==== <callout type="primary" color="" icon="fa fa-book" title="Synopsis"> ---- Return the sum of all elements in a list </callout> <callout color="green" icon="fa fa-indent" title="Stack Diagram"> ---- ^ __Input Stack__ ^ ^ __Output Stack__ ^ | **L<sub>data</sub>** | **→** | **O<sub>sum</sub>** | | //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// || </callout> <callout color="orangered" icon="fa fa-comment" title="Description"> ---- The ''ΣLIST'' command returns the sum of all the elements in **L<sub>data</sub>**, i.e.: $$ \sum_{k=1}^{n}{data_{k}} $$ The list must not be empty and its elements must be suitable for mutual addition. </callout> <callout type="warning" icon="true" title="Compatibility"> ---- ''ΣLIST'' is not fully equivalent to its **userRPL** counterpart. In particular: * in **userRPL** the list must contain at least two elements. </callout> <callout type="info" icon="true" title="Usage"> ---- **__Input__** <code> 4: 3: 2: 1: { 1 'X' '3*Y' } ………………………………………………………………………………………………………… ΣLIST </code> \\ **__Output__** <code> 4: 3: 2: 1: '1+X+3*Y' ………………………………………………………………………………………………………… </code> </callout> <callout color="darkgray" icon="fa fa-hand-o-right" title="Related Commands"> ---- {{page>manual:chapter6:lists&nofooter&noeditbtn&inline}} </callout> manual/chapter6/lists/cmd_sumlist.txt Last modified: 2021/10/02 08:05by jojo1973