This is disturbing!

Bob Sneidar bobsneidar at iotecdigital.com
Thu Sep 6 13:24:32 EDT 2018


By way of rehtoric, and by no means a suggestion of any change in the engine, it might have been better if "is" did a strict string comparison, while "=" or "is equal to" attempted a numerical type conversion, and reverted to a string comparison if either arguement failed. 

What *might* be possible is adding support for "exactly equal to" or "==" where 1.0 == 1 is still true, but "1.0" == "1" is not. 

Bob S


> On Sep 6, 2018, at 10:01 , Mark Waddingham via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
>> Right.  If the explanation is clear then it's not an issue (even if it is a
>> little weird - "6.abc"="6.xyz" is false but "6."&CR is "6."&space is true)
> 
> Well the explanation can be fixed :)
> 
> Its hard to say whether the language would be better or worse if only 'strict' numeric strings were considered equal. After all you'd still have that "1.00000" is "1" is "1.0" is ... which whilst more obvious perhaps, still means you have to work harder to do strict string equality checking (or comparison).
> 
> Warmest Regards,
> 
> Mark.





More information about the use-livecode mailing list