Nested array comparisons

Dick Kriesel dick.kriesel at mail.com
Sun Mar 24 18:41:08 EDT 2013


On Mar 24, 2013, at 1:29 PM, Mark Schonewille <m.schonewille at economy-x-talk.com> wrote:

> As you can conclude from
> 
> "To compare two arrays, simply use the = operator directly on them rather than encoding them first."
> 
> the documenation, particularly with regard to arrays, is not always correct.

Hi, Mark.

Of course documentation isn't always correct, but I don't see how to conclude that from that sentence.  In my experience, that sentence has been correct.  What's incorrect about it?

> 
> Moreover, I would expect that computers return the same value when doing two equal calculations in the same way under equal circumstances.

ArrayEncode encodes not only the keys and values we can see in the array but also the hash keys we cannot see.  The invisible hash keys depend in part on the sequence in which the keys were added to the array, so they may be different for two equal arrays, so the encodings may be different too.

At least, that's what I remember reading somewhere.  Sorry, I don't remember where.

-- Dick



More information about the use-livecode mailing list