Having problems with numberformat....

Sarah Reichelt sarah.reichelt at gmail.com
Wed Nov 1 23:03:08 EST 2006


Hi David,

I was able to replicate your result, but it seems to be related to
putting the value into the message box. If I do this:

    set the numberformat to "#.000000000000"
    put 0.006911491563 into projectedWidth
    put -1.000000000000 * projectedWidth into field 1

Then "field 1" contains -0.006911491563

HTH,
Sarah


On 11/2/06, David Bovill <david at openpartnership.net> wrote:
> Well I am stuck. I have not idea why it does not work. I cannot pass these
> 12 place decimals as parameters and why the script below does not work beats
> me :(
>
> On 01/11/06, David Bovill <david at openpartnership.net> wrote:
> >
> > I am puzzled... I"m dealing with numbers to 12 decimal places, so when
> > doing maths on them I nedd to set the number format first to deal with this
> > level of accuracy - fine, except I can"t figure it - sometimes it is working
> > and sometimes not :(
> >
> > Here is my test script:
> >
> > on mouseDoubleUp
> >     set the numberformat to "#.000000000000"
> >     put 0.006911491563 into projectedWidth
> >     put -1.000000000000 * projectedWidth
> > end mouseDoubleUp
> >
> > When I pasted this on a new stacks card script and doule click I get:
> >
> >   -0.006911
> >
> > When I paste the 3 lines of the handler into the message box - I get what
> > i would expect:
> >
> >   -0.006911491563
> >
> > Why???
> >
> >
> >
> >
> >
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list