order of array is different after split
m.schonewille at economy-x-talk.com
Tue May 21 06:00:24 EDT 2013
Since you're just asking for comments, I'm not sure what kind of answer
you're looking for but I'll try.
To process an array in sorted order, you can put the keys into a variable:
put the keys of myArray into myKeys
sort the lines of myKeys ascending international
repeat for each line myKey in myKeys
// do something with myArray[myKey]
This processes the array in internationally sorted order.
Economy-x-Talk Consulting and Software Engineering
Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other
colour spaces. http://www.color-converter.com
Buy my new book "Programming LiveCode for the Real Beginner"
On 5/21/2013 11:46, Tiemo Hollmann TB wrote:
> when splitting a plain list into an array, the order of the array is
> different to the source list. E.g. if the list was sorted international, the
> array is sorted standard. Is this a standard behavior of split, or do I have
> any options on the array order.
> I know, as far as you access the array by its keys, the order isn't
> relevant, but sometimes it might by suitable to process the array in
> sequence and then it could be valuable if the sequence is the same as the
> Any comments?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode