Rounding sort of ....

Kenneth Brody kenbrody at spamcop.net
Sat Aug 4 16:09:06 PDT 2018


On 3/6/2018 6:47 PM, Wayne Smith via Filepro-list wrote:
> I have a client that wants to take a whole 10,.2 number and if the cents
> are ge .51 add a 1.00 to the total calculation.
> 
> if the cents are le .50  then take away cents and leave whole numbers.
> 
> I have tried some simple things ....in input.prc with no luck ...the list
> is very slow ....one of you brains out there must know a simple math trick
> in fp to solve this ....thanks ahead of time.

Yes, I know this is another "oldie"...

Since they want the .50 to round down, rather than up, simply subtract a 
penny from the amount, and let filePro's rounding take care of the rest.

-- 
Kenneth Brody


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Filepro-list mailing list