SUM inputVector resultVariable

Replaces the result variable with the sum of all the elements of the input vector.

If one or more elements are "Missing", represented by a "." or "NaN", then the sum will be NaN. To avoid this, you can CLEAN the input vector before summing it.

COPY 1,5 A
SUM A B
PRINT A B

The above program produces the following output:

A: (1.0 2.0 3.0 4.0 5.0)
B: 15.0