Hi, On Thu, 27 Aug 2015, Alan Modra wrote: > I don't believe this is sufficient. You need to also set up an array of > pointers to the elements, and sort with a level of indirection for this > to work. Yeah, you need to compare the addresses of elements before sorting started, not the current ones during sorting. *head* -> *desk* Ciao, Michael.