John's suggestion is also likely to be more efficient in the real world, as a simple bubble sort (as suggested in an earlier post on this thread) can take a lot of time in certain situations. The sorting algorithm used in the Standard Library is much less susceptible to such problems.
I do not know the details, but I'm sure others on this list do, or they can be found with a bit of research. RobR
