Xbasic

*AVERAGE Function

Syntax

Average as N = *AVERAGE(C list_on_values)

Arguments

Average

Numerical average of values.

list_on_values

Delimited list of values.

Description

Get the average of a cr-lf delimited numbers.

Discussion

The *AVERAGE() function returns the numerical average of a delimited list of numbers.

Example

dim list as C = "1,3,5,10"
? *average(list)
= 4.75
dim list2 as C
list2 = <<%a%
1
2
5
10
%a%
? *average(list2)
= 4.5

See Also