Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Currency round up
Message
De
17/07/1998 03:30:24
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
 
 
À
16/07/1998 16:47:30
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00117477
Message ID:
00118482
Vues:
21
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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform