Forcing string comparisons, or When is "0" not 0?
Geoff Canyon
gcanyon at gmail.com
Thu Oct 15 14:47:40 EDT 2015
On 2015-10-14 22:19, Devin Asay wrote:
> Shouldn’t there be a way to force a string comparison? I know LC tries
> to be all helpful about casting numerals as numbers, but what if I
> want to know if it’s the exact string?
>
I think you have come up with the best syntax right there.
put 3 is "3" -- true
put 3 is "3.0" -- true
put 3 is 2.999999999999999 -- true
put 3 is exactly "3" -- false
put 3 is exactly "3.0" -- false
put "3" is exactly "3" -- true
put 3 is exactly 3 -- true
put 3 is exactly 3.0 -- true
put 3 is exactly 2.999999999999999 -- false
More information about the use-livecode
mailing list