Strange math behaviour... could someone explain this ?

Lynch, Jonathan bnz2 at cdc.gov
Fri Oct 7 10:26:57 EDT 2005


If you add in a line like this:

Put char 1 to -1 of C into C


then it forces Rev to use the proper number, rather than the
almost-but-not-quite proper number - but man, that has gotta slow things
down. Basically, that is forcing it to convert it from a number to text,
then back to a number. For mass calculations, that would be a real
problem.

But, it is another work-around

-----Original Message-----
From: use-revolution-bounces at lists.runrev.com
[mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of jbv
Sent: Friday, October 07, 2005 10:27 AM
To: How to use Revolution
Subject: Re: Strange math behaviour... could someone explain this ?

with Rev 2.5 on Mac OS9.1 the following
gives 180

  put 36 into A
  put 34.2 into B
  put A-B into C

  put C*100 into C
  put trunc(C)

but with Rev 2.5 Linux I still get 179...

so much for Xplatform compatibility :(

JB


> I just tried this script - but I still get 179
>
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of jbv
> Sent: Friday, October 07, 2005 10:02 AM
> To: How to use Revolution
> Subject: Re: Strange math behaviour... could someone explain this ?
>
> According to my tests (which aren't exhaustive)
> there seems to be another workaround :
>
>   put 36 into A
>   put 34.2 into B
>   put A-B into C
>
>   put C*100 into C
>   put trunc(C)
>
> this gives 180 as a result, while the following line
> (replacing the last 2 of the above example) gives 179
>
>   put trunc(C*100) into C
>
> JB
>
> _______________________________________________
> 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
>
> _______________________________________________
> 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

_______________________________________________
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