XFA Specification
Chapter 23, FormCalc Specification
Arithmetic Built-in Functions
833
Avg()
This function returns the average of the non-null elements of a given set of numbers.
Syntax
Avg(n1 [, n2...])
Parameters
n1
is the first number in the set.
n2, ...
are optional additional numbers in the set.
Returns
The average of its non-null parameters, or null if its parameter are all null.
Examples
Calling Avg() as follows …
Returns
Avg(Price[0], Price[1],
9 if
Price[0]
has a value of 8,
Price[1]
has value 10, and
Price[2]
Price[2], Price[3])
and
Price[3]
are null
Avg(Quantity[*])
Avg(Quantity[*])
9 if
Quantity
has two occurrences with values of 8 and 10
null if all occurrences of
Quantity
are null
Home Index Bookmark Pages
Pages: Home Index All Pages