TOT(0 seems broke
Chad McWilliams
fpmail at computiprint.com
Wed Mar 7 08:16:29 PST 2007
> > -----Original Message-----
> > From: Kenneth Brody [mailto:kenbrody at bestweb.net]
> [...]
> > Also, here's something you can do with TOT() that will delight and
> > confuse everyone here. :-)
> >
> > If: foobar eq "Y"
> > Then: xx = tot(foo)
> > If: foobar ne "Y"
> > Then: xx = tot(bar)
> >
> > What would you expect "xx" to hold? I'll tell you right
> away that it
> > is _not_ the same as
> >
> > If: foobar eq "Y"
> > Then: xx = xx + foo
> > If: foobar ne "Y"
> > Then: xx = xx + bar
> >
> > --
> >
I'm thinking that in the first example, after processing two 'Y' records and
two 'N' records (in that order), that xx would hold the sum of bar+bar,
where in the second example, xx would hold the sum of foo+foo+bar+bar.
Correct?
-Chad McWilliams
More information about the Filepro-list
mailing list