realbasic-nug
[Top] [All Lists]

Re: RbScript - careful with Doubles

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RbScript - careful with Doubles
From: Eric Pousse <eric at adx-online dot com>
Date: Fri, 30 Sep 2005 19:35:14 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <S dot 0000672091 at mail dot tempel dot org> <p06230901bf62730bb8fc at [192 dot 168 dot 2 dot 55]> <C65F1AC6-31A4-11DA-8AA1-000393C6C4C4 at hit dot net> <6B696481-2EEC-46DF-A648-EEF9D8A3AEB0 at adx-online dot com> <FEF336E4-31BA-11DA-8AA1-000393C6C4C4 at hit dot net> <EF672859-2763-4BA1-BFDF-91CB94EAC1BD at adx-online dot com> <3D762723-31BE-11DA-8AA1-000393C6C4C4 at hit dot net> <p06230900bf6324a458bd at [192 dot 168 dot 2 dot 55]>
With double declared in RBScript OK
But double from context are wrong with RB 2005


Eric Pousse

PB G4 15", 1.67GHz, OSX 10.4.2, RB 5.5.5 + 2005
http://www.realcadd.com/realcadd/realcadd.htm

Liste Française RB Solutions
http://www.solutionsrb.com/


Le 30 sept. 05 à 19:22, Bob Delaney a écrit :

At 8:31 AM -0700 9/30/05, Joe Huber wrote:

I didn't follow your code in any detail, but I notice that you're using STR(x) which will inherently reduces the precision of the returned value to a Single.


That was my mistake. It should have been:

return(format(x,  "#.###############"))

With that, my example gives correct results. RBScript does not have a problem with doubles.

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

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