MATHLIB Subroutine
Return the average of the values in an integer array.
call MEANINT(ARRAY_IV, MEAN_VALUE_FV)
ARRAY_IV
An integer array identifier.
MEAN_VALUE_FV
The name of a floating point variable to hold the result of the subroutine.
Description
Use this subroutine to return in MEAN_VALUE_FV the mean (average) of all the values in the integer array.
Example
include mathlib.inc
integer IntegerArray[2,3] is -6, 8, 2, 3, 4, 1
action MeanInt is
call MEANINT(IntegerArray, FResult)
send "Mean of IntegerArray is " FResult "\n" to errorlog
response to start
action MeanInt
exit