Rounding sort of ....

Kenneth Brody kenbrody at spamcop.net
Fri Aug 24 09:06:04 PDT 2018


On 8/23/2018 4:34 PM, flowersoft at compuserve.com wrote:
> 
> On a 10,.2 field?

Well, if the result is going into a (10,.2) field, then it'll have to be 
moved through a (10,.0) field to get filePro to do the rounding.

Either that, or add 49 cents and use FLOOR() to truncate the cents.

> -----Original Message-----
> From: Kenneth Brody via Filepro-list <filepro-list at lists.celestial.com>
> To: filePro Mailing List <filepro-list at lists.celestial.com>
> Sent: Sat, Aug 4, 2018 7:09 pm
> Subject: Re: Rounding sort of ....
> 
> 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.
> 

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



More information about the Filepro-list mailing list