There are some quirks I found on testing this.

This evaluates to false

local tvar

--put empty into tvar

put (tvar is not zero)



This evaluates to true

local tvar

put empty into tvar

put (tvar is not zero)


So it seems a declared var that has had nothing done to it sees itself as
empty and zero. If you put empty into it, then it is not zero.  Cool huh?

On Tue, Sep 11, 2012 at 11:47 AM, Peter Haworth <p...@lcsql.com> wrote:

> Just ran across a little oddity.  The statement "if tVar is not zero"
> evaluates to false if tVar is empty.  Apparently empty and zero are treated
> the same for comparison purposes?
> Pete
> lcSQL Software <http://www.lcsql.com>
> _______________________________________________
> 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
>
_______________________________________________
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

Reply via email to