a fast way to order a type ASC (number)

Blitz3D Forums/Blitz3D Programming/a fast way to order a type ASC (number)

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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.