Re: What? You can't histogram a string array? [message #51680 is a reply to message #51544] |
Tue, 28 November 2006 13:17   |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Tue, 28 Nov 2006 11:43:20 -0700, David Fanning wrote:
> JD Smith writes:
>
>> [quoted text muted]
>
> In running the test program, I get immediate out-of-bounds
> errors with IDL's SORT routine. But nothing of the sort
> (a pun!) with the NASA BSORT routine I always use when I
> need to sort something "for real".
OK, so far OSX and Windows XP throw out of bounds errors. Can anyone
on Linux confirm that this runs without error? I checked libidl.so,
and it mentions qsort, of the GLIBC variety. So it must be my
implementation of qsort in my GLIBC preserves order, but others do
not. Ouch.
Might want to add a note to that page. If you don't have repeated
elements, then the fix Braedley offered works fine. BSORT from
Nasalib sorts and then reorders duplicates to preserve the original
order. It will compromise speed somewhat, but is a good alternative.
JD
P.S. How long as it been the case that SORT scrambles order on Windows?
I'm surprised the issue with IND_INT_SORT didn't come up before.
|
|
|