Sort value pairs in a list by integer
Sort value pairs in a list by integer
- Subject: Sort value pairs in a list by integer
- From: Joseph Weaks <email@hidden>
- Date: Tue, 1 Jul 2003 04:21:05 -0500
I can't get my head around this. I have a list that might contain between
5 to 10 pairs of values:
set foobar to {"foo", 15, "bar", 6, "boo", 2, "far", 19}
The numbers "go with" the preceding string and I want to return a list
sorted in descending order by the integer value. ie. the result should be
sortIt(foobar)
-- {"far", 19, "foo", 15, "bar", 6, "boo", 2}
Any help is appreciated.
Thanks,
Joe Weaks
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.