[Lazarus] Storing currency or real types in a database

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sun May 31 04:36:27 CEST 2009


Graeme Geldenhuys schrieb:

> We have no decided to trunc our currency values to 2 decimals and use
> our own rounding routine (not bankers rounding etc...).

Calculations with amounts of money frequently are subject to detailed 
official prescreptions, e.g. for tax calculations. There exists no way 
to unify all those national or otherwise specified procedures in an 
standard data type. So it's common practice to implement the 
prescriptions in according integer calculations with the prescribed 
scaling and rounding. <sigh>

DoDi





More information about the Lazarus mailing list