Page 1 of 1

PostPosted: Thu May 02, 2002 3:34 pm
by awschwab
The Sort function is fast and useful. One option that would be very nice would be the ability to sort an array of pointers by the values of the objects they point to. I can do that with a sort function written in PocketC, where I can define the compare function, but the advantage of a sorted array of pointers is speed. Would it be straightforward to add a bit to specify sorting by the dereferenced pointer?

I realize that adding every possible option does not make sense, but I thought that this would be useful in a variety of circumstances. (And I of course have a specific one in mind.)

PostPosted: Thu May 02, 2002 4:59 pm
by jstadolnik
This is feasible, and I agree could be useful... especially if null pointers in the sorted array get moved to the end (forward).

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm

PostPosted: Sat May 04, 2002 1:11 pm
by jstadolnik
I've implemented this. You'll see it in the next release.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm