I'm having a problem finding the sum of all of the integers in an array in Livecode
How do you find the sum of all the numbers in an array in Livecode?
471 views Asked by Shalu At
2
I'm having a problem finding the sum of all of the integers in an array in Livecode
The "sum" command is what you need. Check out the dictionary; arrays are supported, though the function is generally used with a comma delimited list.
You can also extract the keys of the array, if they are purely numeric, and apply the function. Otherwise, you may have to extract the nested array of elements of interest into the clear with the "combine" command, and sum that.
Craig Newman