Sorting help!
Jon Hylands
jon at huv.com
Thu Nov 15 19:07:06 UTC 2001
On Thu, 15 Nov 2001 19:37:13 +0100, Stefan Schmiedl <s at xss.de> wrote:
> sorting the <title> field strings will work, even
> if they have different lengths. Access to the <name>
> field is only necessary if the <title> field of the
> records in question is identical, hence has the same
> length. So sorting the name field only occurs with
> identical "prefixes", which have no effect on sort order.
The only reason you can get away with that is because $, has an ascii value
of less than alphabetic characters. If you used $| as the separater, it
wouldn't work in some cases.
I wouldn't want to trust a sort algorithm like that in any application I
cared about...
Later,
Jon
--------------------------------------------------------------
Jon Hylands Jon at huv.com http://www.huv.com/jon
Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
http://www.huv.com
More information about the Squeak-dev
mailing list
|