main logo
Subject: Re: Money field and decimals [was Re: [V4RB] VFloat - strange
Author: Ruslan Zasukhin
Posted: 2001/08/30 08:32:24
 
View Entire Thread
New Search


on 8/30/01 15:58, Francois Van Lerberghe at fvanlerberghe .AT. freegates D.OT be
wrote:

>> Store the money values as a string with two-decimals. Define a virtual
>> method which converts that to a number; this can be used for sorting/fin=
d
>> operations if needed. The string field can be brought into RB very easil=
y
>> and with no time penalty. Use the format function with a format
>> specification "#.00" or "#,00" as needed.
>=20
> Ok. But when you use the field to do calculation, you'll convert the
> string into double. So why don't use directly VDouble ?
> I think converting the string into double lost the precision of the
> string representation. So using directly VDouble avoid the need of
> conversion and, for large database, the time penalty. No ?

Hi Fran=E7ois,

we already have discuss money issue on Valentina list.
Search list archive.

Money MUST NOT BE worked in float or double types NEVER !!!

You always need to store them and work with them in integer types.
Yes, Fran=E7ois, you need to have own arithmetic to work with money values.

--=20
Best regards,
Ruslan Zasukhin

-------------------------
Paradigma.

e-mail: ruslan@paradigmasoft.com
web : http://www.paradigmasoft.com

To subscribe to the Valentina mail list
send a letter to valentina-on .AT. lists D.OT macserve.net
 
©2001 Ruslan Zasukhin
<-- Prior Message New Search Next Message -->