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
 ____________________________________________________________________
 ambassa...@fourthworld.com                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to