the keys of myArray
ambassador at fourthworld.com
Fri Sep 8 09:53:19 EDT 2006
> I was just wondering if there was a way to avoid putting the
> keys into a variable and having to sort that variable... any
> clue about the order in which keys are stored (and output)
> could help bypass that sorting step...
My limited understanding is that the order is related to the hashing
scheme used to index them internally, which is why accessing array
elements by key is so blazingly fast.
Given this apparent relationship between array elements and memory
addresses, it may be simpler to turn the question around and look at it
from a different angle:
Where does the data come from before being put into the array, and what
are the keys comprised of?
There may be other ways to handle this, although if using the built-in
sort command will do what you need it's reasonably efficient. It's only
one line of code -- was it causing a problem in your script?
Managing Editor, revJournal
Rev tips, tutorials and more: http://www.revJournal.com
More information about the Use-livecode