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

Syntax

SUM_FIELDS( [ aflds[, cAlias[, aShoflds ]]] )

Purpose

Sum numeric fields in a file or related set of files.

Arguments

     aFlds -- if passed, array of fields, else all numeric in table

     cAlias -- if passed, table to sum, else current one

     aShoflds -- if passed, cues for sum objects, else field names

Setup

A table is open. No other requirements.

Example

     SUM_FIELDS()

Returns

.T.

Side Effects

Displays results in a window; crash on bad data.

Artful Calls

PUSH/POP_SCR, POP_MSG, MSG, HEADERS, MACRO, PAD, SYSCOLOR, DRAW_BOX

Source File

AA_SUM.PRG

Notes

This is the default function called by THE_USUAL() and entered in the
dictionary record if you do not specify an override udf in the dictionary.

It sums the numeric fields in the current view (comprised of one or more
tables). The user is informed if there are no numeric fields.

Use the arrays as moderate means of customising this function. For example,
there is probably little point in summing numeric fields such as Street
Number, Account or Invoice Number, Age, Number of Children, Times Married,
etc.. Further, summing them will increase the processing time.

Within the context of THE_USUAL(), this function may be used on any subset
of the data by issuing a query first.

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