Lists & sort

BlitzMax Forums/BlitzMax Beginners Area/Lists & sort

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.

Sort bases on the Compare method which returns:

-1: if the "other" object is larger (however you define largeron this object type)

0: if both object are assumed to be the same (this will also be used for remove so don't return 0 if they are the same from sorting view. In this case use -1 or 1. it won't destroy the ordering between objects that are assumed to be smaller or larger to each other). My compare method only returns 0 if the references are pointing to the same object.

1: if the other object is smaller

(or vise versa with 1 / -1)