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 Library for Clipper - <b>l_arsum()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                 L_ARSUM()


Syntax:        L_ARSUM(<array>[,<expN1>,<expN2>])


Purpose:       Sum the numeric elements of a mixed data type array.


Arguments:     <array> the name of the array to be summed.

               <expN1> the element at which to start summing.

               <expN2> the element at which to stop summing.

               If <expN1> and <expN2> are not specified all numeric
               elements in the array are summed.


Returns:       The sum of all numeric elements in <array> if <expN1>
               and <expN2> not specified. Else the sum of all numeric
               elements within the range <expN1> to <expN2>.


Examples:      DECLARE array[8]

               array[1] = 23
               array[2] = 0
               array[3] = 46
               array[4] = 2000
               array[5] = 23
               array[6] = 100
               array[7] = 2546
               array[8] = 25

               ? L_ARSUM(array)             && Result: 4763.00
               ? L_ARSUM(array,4,8)         && Result: 4694.00


Language:      C

See Also: L_ARMAX() L_ARMIN() L_ARCOUNT()

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