are arrays auto-sorted by their keys?

David Vaughan dvk at dvkconsult.com.au
Tue Nov 26 01:08:01 EST 2002


On Tuesday, Nov 26, 2002, at 16:11 Australia/Sydney, Oliver Hardt wrote:

> hello:  as keys i use words, not numbers.  when i convert the array to 
> an "ordinary" container using the combine command, i find that the 
> keys have been automatically sorted alphanumerically.  is there a way 
> to have RR not do this?  thank you!  olli.

Ah, you got me there. No, I do not know how to prevent that if arrays 
are used. It may be interesting, without being an answer, that if you 
simply take the keys of the array then they are not sorted as the 
"combine"d data is sorted. However, nor are the keys in the order of 
creation. I assume they are in hash number order. Try it.
e.g.
puf function1(data1,data2) into array1
get the keys of array1
combine array1 with return and comma
put it & return & array1

cheers
David
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list