A Dose of Sorts for Mac

325 KB   551 downloads
1.0 Freeware    
Provides AppleScript implementations of a few sorting algorithms.




A Dose of Sorts is a useful collection of AppleScript implementations of a few sorting algorithms.

The sorts are all of the "in place" variety: that is, they rearrange the items in the actual lists passed to them. They don't return sorted copies — or any 'result' at all. (This is by far the most efficient way in AppleScript.) It's possible (and in fact necessary!) to specify what range of the list is to be sorted.

There are customisable versions of most of the sorts. These take plug-in scripts which configure them to sort items which have to be compared in particular ways — such as lists and records. They can also sort lists in parallel with the main sort, if necessary. A customisable sort saves having to write an entire sort for each contingency.

The preferred sort can either be loaded into a script at run time or its source code can be pasted into that of the script. The sort handlers have their own names, but the supplied scripts each have sort property set to the handler, so a sort handler can be called either with sort or with its own label.

The parameters in each case are the list and two indices indicating the range to be sorted. The indices can be positive or negative and are interchangeable.
Last updated on November 16th, 2010

top FREE alternatives

0 User reviews so far.