@ jacque and Klaus
Let me add one remark to your method to sort first. I tried to do this also following an earlier note of you.
But then I used *combine* to output the array.
Sad to say, combine respects the sort, but distorts the sortType and one has (in most cases) to sort again!
Example
Code: Select all
on mouseUp
repeat with j = 20 down to 1
put 100*j into a[21-j]
end repeat
put the keys of a into tKeys
sort tKeys numeric
combine a using return and comma
put a into fld "out"
end mouseUp
## Thereafter a is sorted, but as ascii, NOT numeric:
1,2000
10,1100
11,1000
12,900
13,800
14,700
15,600
16,500
17,400
18,300
19,200
2,1900
20,100
3,1800
4,1700
5,1600
6,1500
7,1400
8,1300
9,1200
By the way, as you are both grandmasters of LC.
jaques wrote: ... the other 5,000 correct answers you've given here ...
Has Klaus already given 82 incorrect answers here, did he?