Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Currency round up
Message
From
17/07/1998 03:30:24
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
16/07/1998 16:47:30
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00117477
Message ID:
00118482
Views:
20
My solution for them is to allow them to modify the calculated result.

By the way, thanks for the answers.




>>The currency data type ifs fixed at 4 decimal places. It is a good idea NOT to round the values until the calculations are finished. Rounding earlier causes a more prominent rounding error in the amounts. So you would;
>>
>>
>>* Do all of the calculations first
>>
>>* Then
>>REPLACE CurrencyField WITH ROUND(<TheResult>,2)
>>
>>
>>This reduces the amount of the roudning error. For example add these numbers and round.
>>
>
>OTOH, one may do better by not calculating too precisely, depending on the customer. I've often had situations where customer controlled my code by hand, or using hand calculator, strictly relying on the values printed, and having the calculator (or accountant's mindset) round it to two decimals every once in a while, and then they come and complain about 'inaccuracy' of my code. So, sometimes you may want to do it right, and at other times you may want to do it like they do.
Previous
Reply
Map
View

Click here to load this message in the networking platform