Nested array comparisons
ambassador at fourthworld.com
Sun Mar 24 19:01:43 EDT 2013
Dick Kriesel wrote:
> 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.
I'm waaaay overdue to finish the article for LiveCode Journal
documenting the format arrayEncode outputs, and I hope to get to that
very soon, but in the meantime I can say that the hash info is not part
of that format.
What comes out of arrayEncode is kinda what you'd get if you walked
through all of the array keys one by one and wrote out the key-value
pairs with delimiters and length specifiers. There are a few other
details (like an op code for data type, allowing numbers to be stored in
binary format and so that nested arrays can be flagged as such for
recursive parsing), but the hash that gives them their magic in memory
is not included.
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