--- Michael Fowler <[EMAIL PROTECTED]> wrote:
> On Fri, Jul 20, 2001 at 09:01:55AM -0700, Paul wrote:
> > I don't know the behavior for certain on a final return of zero,
> > but I don't think it does anything, which likely means that later
> > things may or may not reverse their order based on comparisons of
> > other pairs, so that the end result is unpredictable. 
> 
> You were doing great, until you got to here, where you got a little
> confusing.  A final return of zero indicates $a and $b are equal. 
> This means they will bunch together, and in the current
> implementation of sort (5.6.1's) they will stay in the same position
> they had in the original list (sort algorithms that do this are known
> as stable).
> 
> The results of the sort is entirely predictable because the
> comparison subroutines returns consistent results.

And the light goes on!
Knew I was fuzzing something in there, but couldn't figure out what.
You mentiones stable algorithms, and I remembered reading it.

Thanks.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to