When penny becomes obsolete
Kenneth Brody
kenbrody at bestweb.net
Fri Jul 7 10:41:57 PDT 2006
Quoting SmittyUSN1 (Fri, 7 Jul 2006 08:58:44 -0400 (Eastern Standard
Time)):
>
> What with the list being so slow I thought I would ask the list a
> question about what to do when the .01 cent is obsolete. I am sure
> that just the TOTAL will need to be rounded UP to the nearest nickel.
> Anybody have any ideas on how to accomplish this task?
>
> I sincerely hope that the list fairy doesn't have a rude comment to make
> about what might be a simple task.
To round to the nearest nickel:
result = doedit(amount*"20",".0")/"20"
To round up to the next nickel:
result = int((amount+"0.04")*"20")/"20"
The logic behind these is left as an exercise to the reader.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list