TOT(0 seems broke

George Simon GSimon at americanriverintl.com
Wed Mar 7 08:24:21 PST 2007


-----Original Message-----
From: Kenneth Brody [mailto:kenbrody at bestweb.net] 
Sent: Wednesday, March 07, 2007 10:40 AM
To: George Simon
Cc: Fplist
Subject: RE: TOT(0 seems broke

Quoting George Simon (Wed, 7 Mar 2007 10:24:14 -0500):

> -----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
>
> --
>
Here is my code and my results:

     LABEL             D E F I N E
──────────────────────────────────
  1  -------   -   -   -   -   -
LOCAL  ◄ If: 18="no"
       Then: ce=tot(60)
  2  -------   -   -   -   -   -
       ◄ If: not LOCAL
       Then: ce=tot(64)
  3  -------   -   -   -   -   -
       ◄ If:
       Then: end

Delivery Date | 18 |    CE    |    60     |    64
--------------+----+----------+-----------+-------------
01/12/2006    |NO  |      .00 |       .00 |      8.47
01/12/2006    |NO  |      .00 |       .00 |     12.74
01/12/2006    |OUT |    58.97 |      7.00 |     58.97
01/12/2006    |NO  |     5.95 |      5.95 |     59.25
01/12/2006    |NO  |     6.95 |      6.95 |     54.87
01/12/2006    |OUT |    88.95 |      5.00 |     88.95
01/12/2006    |NO  |     4.95 |      4.95 |     31.60
01/12/2006    |OUT |    53.64 |      7.00 |     53.64
01/12/2006    |NO  |     5.95 |      5.95 |     43.26
01/12/2006    |OUT |    48.31 |      7.00 |     48.31
01/12/2006    |NO  |      .00 |       .00 |      3.73
01/12/2006    |NO  |      .00 |       .00 |      3.73
01/12/2006    |OUT |    58.97 |      7.00 |     58.97
01/12/2006    |NO  |     4.95 |      4.95 |     55.59
01/12/2006    |OUT |    40.93 |      4.95 |     40.93
01/12/2006    |OUT |    40.98 |      5.00 |     40.98
--------------+----+----------+-----------+-------------
01/12/2006    |    |   419.50 |     71.70 |    663.99
--------------+----+----------+-----------+-------------
GRAND TOTAL   |    |   419.50 |     71.70 |    663.99


More information about the Filepro-list mailing list