Tell me I'm not crazy

Richard Gaskin ambassador at fourthworld.com
Mon Sep 19 16:08:17 CDT 2011


Tereza Snyder wrote:

> You CAN compare arrays for equality (see the docs for "="), but evidently not for INequality!

That's good to know.  I had thought that all operators only worked on 
strings or numbers, and since attempting to get the value of an array 
(as opposed to the value of one of its elements) will always return an 
empty string that "=" would work no better than the rest of them. 
Interesting that it can be used like this.

For other types of comparisons, you might consider using either 
arrayEncode or combine to flatten the array to a string that can then be 
compared.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv



More information about the use-livecode mailing list