valueDiff for arrays?

Richard Gaskin ambassador at fourthworld.com
Tue Aug 7 18:31:09 EDT 2018


Bob Sneidar wrote:

 > You can as I understand get the keys of an array, which returns a
 > string, then sort the string. I am unaware of any function that can
 > sort an array natively before it is returned.

The array itself is a collection of pointers, grouped into buckets 
according to a hash designed for efficient even distribution.

Unlike a string, there is no single bytestream to sort.  There is no 
there there.

That's also why they can't be transfered to disk or over a network 
unless they're serialized first with arrayEncode.

Queries for the *keys* of an array do return as a string, which is sortable.

Associative arrays are tricky but fascinating things.  I spent some time 
with the Wikipedia page on them to get my head at least a bit wrapped 
around their internal structure and operations:

https://en.wikipedia.org/wiki/Associative_array

-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list