AverageI(Values: Array): Integer;
Values. Array of integer numbers.
The AverageI method returns arithmetic average of integer arguments.
It is required to use an array of value of the Integer type.
The function works correctly with both one-dimension and two-dimension arrays.
To execute the example, add a link to the MathFin system assembly.
Sub UserProc;
Var
r: Integer;
Arr: Array[5] Of Integer;
Begin
Arr[0] := 10;
Arr[1] := 7;
Arr[2] := 9;
Arr[3] := 27;
Arr[4] := 2;
r := Math.AverageI(Arr);
Debug.WriteLine(r);
End Sub UserProc;
After executing the example the console window displays the arithmetic average of arguments equal to 11.
See also: