Stupid tot() question

John Esak john at valar.com
Thu Feb 26 00:34:06 PST 2004


It is too bad that the original docs for the aggregate functions (like TOT,
AVG, MIN, MAX...) were somehow lost. I think they were very well explained
in those 3 ring pages... probably from a "New Features" group... I've read
this whole thread and it is pretty funny...

a=tot(n)

is about what it says in the help pages... "Gets a total or subtotal on
field n."  It neglects to say that these subtotals and total are only
available in the @brk areas. Too bad, because they are so dead simple to
use, and they do work precisely well.  There was a time when I avoided using
them, but once I got the xx=xx+ytd(sales) thing in my head...  they made a
great deal of sense.  Ken's point that there are many times when you only
want subtotals of values based on certain criteria is the key here. Doing
the subtotals any other way doesn't seem as useful to me. As for being
"broken". Like Ken, I would have to say, show me... :-). I don't know how to
break these functions, they just work and to my filePro-based mind, they
couldn't be simpler to use.  I agree with Jay on only one point this time.
These very useful functions are extremely under-documented.

John


> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of Kenneth
> Brody
> Sent: Wednesday, February 25, 2004 9:37 PM
> To: Jay R. Ashworth
> Cc: filepro-list at seaslug.org
> Subject: Re: Stupid tot() question
>
>
> "Jay R. Ashworth" wrote:
> [...]
> > > You always have 5 different values (assuming 3 break levels) for every
> > > dummy field not declared in automatic.  The fact that TOT() makes this
> > > more obvious to you does not mean the semantics have changed.
> >
> > If all 5 copies of the variable have the same value, then, for my
> > purposes (since filePro doesn't have pointers, and all 5 change
> > simultaneously on assignment), then it's transparent to me.
>
> If you are using the dummy field to accumulate values, then the
> copies may not have the same value.
>
> > The semantics are what they appear to be.  Particularly when what they
> > *appear* to be is sane, even if the actual implementation is broken,
> > which, based on your latest comment, it appears it is.
>
> I see nothing broken.
>
> Please show me how the following are different (assuming "ytd_sales" is
> a real field):
>
>     xx(16,.2) = xx + ytd_sales
>     yy(16,.2) = tot(ytd_sales)
>
> Please use specific examples, with actual data, rather than what you
> feel they do.
>
> Then explain how things are "broken".
>
> --
>
> +---------+----------------------------------+--------------------
> ---------+
> | Kenneth |     kenbrody at spamcop.net      | "The opinions
> expressed     |
> |    J.   |    http://www.hvcomputer.com     |  herein are not
> necessarily |
> |  Brody  |      http://www.fptech.com       |  those of fP
> Technologies." |
> +---------+----------------------------------+--------------------
> ---------+
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list