[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
+---------------------------------+
|             AVERAGE             |
+---------------------------------+
AVERAGE [<expr list>]
        [<scope>]
        [FOR <expL1>]
        [WHILE <expL2>]
        [TO <memvar list>
        | TO ARRAY <array>]
        [NOOPTIMIZE]

-----------------------------------
Averages numeric expressions or database fields.
-----------------------------------

<expr list>
        Expressions to be averaged.

<scope>
        Averages only records that fall in range of records specified.

FOR <expL1>
        Averages only records that satisfy logical condition <expL1>.

WHILE <expL2>
        Includes records in average as long as logical expression <expL2>
evaluates to true.

TO <memvar list>
TO ARRAY <array>
        Stores results to list of memory variables or one-dimensional array.
If array doesn't exist it is created.  If array exists and isn't large
enough it is expanded; if array is larger than necessary, its size is
reduced.

NOOPTIMIZE
        Disables Rushmore.

+---------------------------------+
|            Examples             |
+---------------------------------+
USE customer
AVERAGE taxrate FOR state = 'OH'

AVERAGE taxrate TO mtaxes

? mtaxes

AVERAGE taxrate+10 TO mtaxes

-----------------------------------

See Also:  CALCULATE, DECLARE, DIMENSION, SET HEADING, SUM

-----------------------------------

See Also: CALCULATE DECLARE DIMENSION SET HEADING SUM
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson