Ignoring the leading or trailing whitespace is weird and counterintuitive. If the language was more perfect, I think it would first not ignore the other characters in the string no matter what they look like, then do the implicit type coercion and then the comparison, even though there are definitely use cases where 1≠1.0≠1.0000000000, but those sorts of edge cases perhaps better left documented and not handled. In all cases, where intuition and behavior are not in line, the manual should fill in the gap.
On Thu, Sep 6, 2018 at 1:02 PM Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > On 2018-09-06 18:52, Mike Kerner via use-livecode 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. > > -- > Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ > LiveCode: Everyone can create apps > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, "This is good." _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode