realbasic-nug
[Top] [All Lists]

Re: double to string????

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: double to string????
From: William Squires <wsquires@satx.rr.com>
Date: Mon, 30 Jun 2008 20:20:10 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <C48EF1BB.4EB29%markus_winter@online.de>
References: <C48EF1BB.4EB29%markus_winter@online.de>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Try Format(v, "#0.00") // include however many zeroes you want after the decimal point, but keep in mind that a double is only 8-bytes, so I don't think you're going to get all 6 million decimal places that you have below (I think the limit is around 15 significant digits, total, but that's just my memory - your mileage may vary :) )

On Jun 30, 2008, at 1:25 PM, Markus Winter wrote:

Hi all,

the following code

v as double
v = 12345678901234567890.1234567890

EF1.text = Format(v,
"- #########################################################.############ ####
######################################")

produces

12345678901234567168.

in the EditField - bug or "feature"? And what can I do about it?

Thanks

Markus

P.S. In my example it's not only the numbers AFTER the decimal point that
are missing




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>