Forcing string comparisons, or When is "0" not 0?

Peter W A Wood peterwawood at gmail.com
Thu Oct 15 18:47:12 EDT 2015


Mark 

> On 16 Oct 2015, at 01:07, Mark Waddingham <mark at livecode.com> wrote:
> 
>  put "0" + 0 into tVar1 -- tVar is really a number
>    put "0" & 0 into tVar2 -- tVar is really a string
>    put tVar1 is really tVar2 -- false

The current implementation appears to differ a little from the above. You need to specify integer or real as number is not currently supported.

When I try “0” + 0 in the message box only “is really a string” returns true, “is really an integer” returns false.

Warm regards

Peter




More information about the Use-livecode mailing list