11.04.2013 Views

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SUM<br />

Syntax<br />

SUM(dyn.array [, ] [, start.expr [, stop.expr]])<br />

Description<br />

The <strong>UniBasic</strong> SUM function adds the numeric values in the dynamic array dyn.array<br />

according to dynamic array delimiters. SUM begins with the lowest level of delimiter<br />

and sums all values to the next level. You can input a range, starting position, and<br />

level at which to perform the sum.<br />

Note: The SUM function can contain a maximum of 1621 characters.<br />

Parameters<br />

The following table describes each parameter of the syntax.<br />

Parameter Description<br />

dyn.array Specifies a dynamic array of numeric values to sum.<br />

, , start.expr<br />

, stop.expr<br />

Specifies a range within the dynamic array to sum. The range is<br />

specified as an attribute, a value, a starting point, and a stopping<br />

point.<br />

SUM Parameters<br />

Tip: To sum all elements in an array, execute SUM twice. The first execution sums<br />

each group of subvalues and returns a string of numeric values; the second SUM<br />

returns a single value.<br />

SUM 1-889

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!