List: discuss@lists.openscad.org
From: Jerry Davis
Re: [OpenSCAD] How to add all the values in a list together
Mon, Jun 22, 2015 8:47 PM
a[0]:a[i]+sum(a,i-1);
>
> echo(sum(a,4));
>
> echo(1+5+7+90+10);
>
> 2015-06-22 21:21 GMT+02:00 cn145912 :
>
>> If I have a list
>> a = [1, 5, 7, 90, 10];
>> how would I add all the values together to get 115?