The king of Sorts is the QuickSort. There is an example in the CodeArcs, but it is working with an array rather than a Type.
http://www.blitzbasic.com/codearcs/codearcs.php?code=61
The principle on which it operates is a recursive binary chop {split the list into two halfs (see which is biggest), then split each half into two halfs.... keep going until you are comparing individual items} The code above has the 'difficult bit' coded (the recursive routine) so it should be easy to adapt to work with types.
http://www.blitzbasic.com/codearcs/codearcs.php?code=61
The principle on which it operates is a recursive binary chop {split the list into two halfs (see which is biggest), then split each half into two halfs.... keep going until you are comparing individual items} The code above has the 'difficult bit' coded (the recursive routine) so it should be easy to adapt to work with types.