sum | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns the sum of a list of numbers. | ||||||
Introduced | 1.0 | ||||||
Changes | The ability to use an array was introduced in version 1.1. In previous versions, only lists of numbers could be used with the sum function. | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Operator: + Command: add, group Function: standardDeviation, min, max, extents Control Structure: function Glossary: statement, return, value, math operation | ||||||
Description | Use the sum function to add a group of values together. The sum function is equivalent to the following statements:
If the numbersList is empty, the sum function returns zero. If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information. |