function Sum: Integer;
Sums vector values.
Returns: Int32 - the sum of all calling object elements.
Examples
var
a: TMtxInt;
begin
MtxVecInt.CreateIt(out a);
try
a.SetIt(2,2,new int[] {1,3,-2});
int s = a.Sum; // s = 2
finally
MtxVecInt.FreeIt(ref a);
end;
end;
Indexed: function Sum(Index: Integer; Len: Integer): Integer;
Returns the sum of calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Index | Integer | start index |
| 2 | Len | Integer | element count |
Returns: Int32
Remarks:
An exception is raised if array borders are overrun/underrun.