Array Sum: Difference between revisions
From MultiCharts
(Created page with "Returns a sum of the values contained in a range of elements, specified by the starting and ending indexes, of the specified one-dimensional array; returns the number of true ...") |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
Returns a sum of the values contained in a range of elements, specified by the starting and ending indexes, of the specified one-dimensional array; returns the number of true elements if the array contains true/false values; returns a value of 0 if the array contains string values. | Returns a sum of the values contained in a range of elements, specified by the starting and ending indexes, of the specified one-dimensional array; returns the number of true elements if the array contains true/false values; returns a value of 0 if the array contains string values. | ||
== Usage == | |||
<syntaxhighlight>Array_Sum(ArrayName,StartIndex,EndIndex)</syntaxhighlight> | <syntaxhighlight>Array_Sum(ArrayName,StartIndex,EndIndex)</syntaxhighlight> | ||
Where: | Where: | ||
:'''ArrayName''' - an expression specifying the name of an array | |||
:'''StartIndex''' - a numerical expression specifying the starting index for the range | |||
:'''EndIndex''' - a numerical expression specifying the ending index for the range | |||
== Example == | |||
Assign a value, indicating a sum of the values contained in the segment of Array1 that begins at the index of 4 and ends at the index of 6, to Value1 variable: | Assign a value, indicating a sum of the values contained in the segment of Array1 that begins at the index of 4 and ends at the index of 6, to Value1 variable: | ||
Latest revision as of 21:31, 27 February 2017
Returns a sum of the values contained in a range of elements, specified by the starting and ending indexes, of the specified one-dimensional array; returns the number of true elements if the array contains true/false values; returns a value of 0 if the array contains string values.
Usage
Array_Sum(ArrayName,StartIndex,EndIndex)
Where:
- ArrayName - an expression specifying the name of an array
- StartIndex - a numerical expression specifying the starting index for the range
- EndIndex - a numerical expression specifying the ending index for the range
Example
Assign a value, indicating a sum of the values contained in the segment of Array1 that begins at the index of 4 and ends at the index of 6, to Value1 variable:
Value1=Array_Sum(Array1,4,6);