Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>sum</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SUM


Syntax:     SUM [<scope>] <expN list> TO <memvar list> [FOR
            <condition>] [WHILE <condition>]

Purpose:    To sum a series of numeric expressions to memory variables
            for a range of records in the current work area.

Arguments:  <expN list> is the list of numeric values to SUM for
            each record processed.

            <memvar list> identifies the receiving memory variables
            for the SUM and are created at the time of execution of the
            command.  Existing memory variables with the same names are
            overwritten.  This list must contain the same number of
            elements as the list of expressions to SUM.

Options:    Scope: The <scope> is the portion of the current
            database file to SUM.  The default scope is ALL.

            Condition: The FOR clause specifies the conditional set
            of records to SUM within the given scope.  The WHILE clause
            specifies the set of records meeting the condition from the
            current record until the condition fails.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   USE Sales
   SUM Amount + 10, Amount TO sum1, sum2

   ? sum1               && Result: 151515.00
   ? sum2               && Result: 150675.00


See Also: AVERAGE TOTAL

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson