Weird array comparison limitation

Richard Gaskin ambassador at fourthworld.com
Thu Nov 29 10:20:13 EST 2012


Alex Tweedly wrote:

> You can compare two arrays for being equal - but you can't compare them
> for being unequal !

I'll bet this is just a byproduct of the parser's current complexity, 
one that hopefully they'll extend for completeness.

Historically, all comparison operators treated arrays as empty strings 
since they're not strings at all per se.

Apparently they special-cased "=" to be able to check whether a variable 
is an array or a string, and if the former to dive into its contents for 
a more thorough comparison, but they haven't yet extended that to the 
other operators.

Have you filed a request for this?

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list