Sorting inside a sorted list?

BlitzMax Forums/BlitzMax Beginners Area/Sorting inside a sorted list?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Can't you just do this instead of sorting it twice?

Method compare:Int(v:Object)
        If sortdfa_type(v).z = z Then
			Return sortdfa_type(v).id - id
        Else  
			Return z - sortdfa_type(v).z
        EndIf 
EndMethod


And then sort it only once in ascending order.