Re: TZF - Calculating

"b.evers" <[email protected]> Tue, 9 Sep 2003 10:25:10 +0200
Newsgroups gmane.comp.lang.delphi.topaz
Message-ID <[email protected]>
Pierre,

----- Original Message -----
From: "Pierre Wittwer" <[email protected]>
To: <[email protected]>
Sent: Tuesday, September 09, 2003 1:44 AM
Subject: TZF - Calculating


> Hi Topaz-users (or Delphi-users),
>
> I have a simple question. I have to convert a string into a real.e.g.
> s = '3.10'  and r is the real.
> Using Val(s,r,code) I get the real as r = 3.09999999999854......instead of
> 3.10
> Using the SReal of Topaz I get the correct  '3.10' in the string. But for
> calculating I need the real r
> What is wrong?  Thank you for your help
>

If you use it for money calculations, try the currency type in Delphi. It
has 4 decimal places.

Benno

--^----------------------------------------------------------------
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?clvXPN.a5kvff.Z2NsZHQt
Or send an email to: [email protected]

TOPICA - Start your own email discussion group. FREE!
http://www.topica.com/partner/tag02/create/index2.html
--^----------------------------------------------------------------