Type Bob Field X,Y Field SortUsingY Method Compare(other:Object) If Bob(other) If SortUsingY Return Sgn(Y - Bob(other).Y) Else Return Sgn(X - Bob(other).X) EndIf EndIf Return -1 EndMethod EndTypeOr something like that. It's probably better to have a global variable controlling which parameter to use, instead of one for each type instance.
Sorting any field
BlitzMax Forums/BlitzMax Beginners Area/Sorting any fieldThe 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.