|
Re: machine dependant sort & other IDL mysteries [message #33955 is a reply to message #33953] |
Thu, 06 February 2003 07:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Mark Servetus (markservetus@hotmail.com) writes:
> Just got done debugging a case of the machine dependant sort method
> (many thanks to pvwave) when the values being sorted are identical.
> (XP vs. 2000, fyi)
>
> Since IDL is marketed as machine independent, I would have expected a
> note in the reference that SORT may not produce same results in some
> cases. Then I would have expected a /FIFO or something flag which,
> when used, would guarantee cross machine congruence.
>
> Since neither of those things was provided, I am now suspicious of
> other methods.
>
> Does anyone have any advice that would ease my worries?
I think you have the wrong idea of what "machine independent"
means. It certainly doesn't mean "runs identically". For
something to "run identically" RSI would have to not only
write the IDL code, they would have to write the operating
system code for all the machines they planned to support.
Obviously, they are not going to do that. So they take
advantage of what an operating system offers. Sorting
things is a common OS operation, so each OS provides
a SORT algorithm. Microsoft's algorithm just happens
to be brain dead. I'm not sure that is completely RSI's
fault.
Yes, you might have expected a caveat to that effect,
but if RSI gets into the business of providing caveats
to all of their routines, I'm afraid I'll have to measure
for another bookcase to hold the expanded documentation
suite.
And, anyway, two minutes searching Google archives for
IDL and SORT turns up the NASA BSORT routine anyway.
Problem solved. :-)
Cheers,
David
P.S. JAVA seems to be the kind of thing that "runs
identically" (well, maybe it will once Microsoft gets
the new Sun patches out to us), but I've noticed lately
that JAVA programs seem to be buggier than even *my* programs.
Maybe "runs identically" is beyond our reach.
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|