Re: Sorting Numbers

From: Jonathan Coxhead (
Date: Mon Mar 13 2000 - 17:52:53 EST

 | You can easily implement this with a finite number of sorting
 | markers if you allow arbitrary length strings of sorting markers.
 | Think about how UTF-8 works again, and then you will see the light.

   I had considered that, but I didn't like it much. You might just
as well have just 1 marker, and precede an integer with N digits with
N copies of the sorting marker. It could be worse, and nothing else
springs to mind.

   In fact, that has the virtue that it also serves a purpose as
markup (allowing swift lexical analysis): if you do it like that, you
can tell if a comma (say) is part of a number, or a separator. If #
is the sorting marker:

      1,1,2,3,5,8 becomes #1,#1,#2,#3,#5,#8


      3.1416 becomes ######3.1416

   H'mm ... maybe it's not so bad after all ...

 o o o (_|/

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:59 EDT