Summary
Sums vector values.
Class
TMtxVec
Declaration
Procedure Sum(out ASum: TSample; Index, Len: integer);
Description
Calculates the sum of calling object elements [Index]..[Index+Len-1] and stores the result in real ASum variable. An exception is raised if calling object
Complex property is True or array borders are overrun/underrun.
Declaration
Function Sum(Index, Len: integer): TSample;
Description
Returns the sum of calling object elements [Index]..[Index+Len-1]. An exception is raised if calling object
Complex property is True or array borders are overrun/underrun.
Declaration
Procedure Sum(out ASum: TCplx; Index, Len: integer);
Description
Calculates the sum of calling object complex elements [Index]..[Index+Len-1] and stores the result in complex ASum variable. An exception is raised if calling object
Complex property is False or array borders are overrun/underrun.
Declaration
Procedure Sum(out ASum: TCplx);
Description
Calculates the sum of all calling object complex elements and stores the result in complex ASum variable. An exception is raised if calling object
Complex property is False.
Declaration
Function Sum: TSample;
Description
Returns the sum of all calling object elements. An exception is raised if calling object
Complex property is true.
Example 1
var a: TVec;
b: TSample;
begin
CreateIt(a);
a.SetIt(False,[1,2,3,4]);
b := a.Sum; // b = 10
FreeIt(a);
end;
| Copyright 2008 Dew Research |
http://www.dewresearch.com