Possible insanity, or is it LC 7.0.1?

Peter W A Wood peterwawood at gmail.com
Wed Jan 14 22:06:26 EST 2015


I experimented a little further and found that, on my set up, I got the same results as Roger.

I ran this in the multi-line message box:

put "version:" && the version & return into tReport
put "os:" && the platform & the systemVersion & return after tReport
put isNumber(1.884956) & return after tReport
put 1.884956 into tVar
put "Is tVar a number?" && isNumber(tVar) & return after tReport 
put 1.884956 into tVar
put tVar / 1 into tVar2
put "Is tVar a number?" && isNumber(tVar) & return after tReport
put "Is tVar2 a number?" &&  isNumber(tVar2) & return after tReport
put tReport

These are the results:
version: 7.0.1
os: MacOS10.10.1
true
Is tVar a number? true
Is tVar a number? false
Is tVar2 a number? false

It seems dividing the number was sufficient to stop it being one!

From playing in the message box, I noticed that dividing 1.12345 by 1 results in a number but dividing 1.123456 doesn’t. If I remove the last digit from Graham’s magic 1.884956, the multiline script works correctly. So it would seem the problem is related to the number of significant digits. (If I change the number to 1.884955, the multiline script still gives incorrect results.)

Regards

Peter

> On 15 Jan 2015, at 09:13, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
> 
> On Thu, Jan 15, 2015 at 8:29 AM, Roger Guay <irog at mac.com> wrote:
> 
>> 
>> I get Paul's results when I do it Paul’s way, but I don’t get Graham’s
>> results when I do it his way via the message box!!
>> 
> 
> Same here and I'm on Mavericks. And just to confuse the matter even further:
> 
> put 1.884956 into tVar
> put isNumber(tVar)
> 
> put 1.884956 into tVar
> put (tVar + 0)
> 
> put value(1.884956+0)
> 
> All three work fine.
> 
> put 1.884956 into tVar
> put isNumber(tVar)
> put value(tVar + 0)
> 
> does not.
> 
> Graham, definitely one for you to log with the QCC.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list