Is there a name for this number ordering format?

At work I have to file stuff according to street address, and it’s in a numerical format which makes sense in it’s own way but which is rather different from ordinary numerical order. 1 comes before 10-19, then 100-199, then 1000-1999, 10,000-19,999, etc. THEN you do all the numbers starting with 2: 2, 20-29, 200-299, 2000-2999, etc. Then 3’s, then 4’s and so forth. Is there a standard name for this?

alphabetical

no, really – the sorting you describe is what would happen on your computer if you named a bunch of files with those numbers, then sorted them by name.

:smack: Another can’t see the forest for the trees question. Thanks.

ASCII order - Computers treat numbers as just another character symbol and sorts accordingly.

Not alphabetical. By the OP’s description, 12 comes before 110, for instance. Alphabetically, 110 should be between 11 and 12.

The way to describe it is that you sort into 9 groups based on the leading digit, then sort the group numerically. That doesn’t answer whether there’s a name for it.

Actually, that doesn’t happen any more - at least not with Windows XP - it sorts files in a proper number-aware fashion - before this, it was necessary to pad numeric portions of filenames with leading zeroes to make them sort into numeric sequence.

True. Assuming that’s a feature of the system and it’s not just that Lumpy has slightly misdescribed alphabetic sorting… It’s something like a tree-based sorting method, branching on successive digits, isn’t it?

Isn’t it just called numerical sorting? i.e. Sort those files alphabetically and those numerically?

I’d call it character-by-character sorting.

As a side note: MacOS X does this as well, at least in the Finder (the main file system browser).

However, when running one of the Unix shells in a terminal emulator, you get the traditional, dumb, character-by-character ordering. This can be puzzling for a moment if you’re looking at the same directory’s contents from both a Finder window and a terminal window.

Sometimes called ‘asciibetical’.

It appears this is a three part ordering:

  1. Magnitude of the first digit.
  2. Number of digits
  3. Absolute magnitude

This system doesn’t seem particularly intuitive, so I’d seriously doubt it has a name. As yabob pointed out, because “12” would come before “100”, it is clearly not “asciibetical”.

I don’t think it is particularly intuitive, because I’d imagine either numerical or “asciibetical” ordering would be a simpler and faster system. The first, obviously, because it’s a one part ordering and our brains and computers are already able to accomplish that quickly. The latter because while there is value in the magnitude of the number when you’re actually trying to physically locate the address, it isn’t particularly useful when filing (plus, “closeness” is shown by other information, like the street name). Thus, digit-ordering would remove the relationship, and instead cluster addresses by how similar the initial portions of the numbers are. Plus, it’s a simple ordering.

I would be interested to know why you all use this system and what it’s benefits are, though.

If it interests anyone, I found a description of the MacOS Finder’s rules for sorting file names. And here’s one on the rules used in the newer versions of Windows.

True, and I’m sure that’s why it was done that way for a very long time, on most operating systems. It’s a dirt-simple algorithm to implement.

But I think what happened is that more people started using software that generated sequentially-numbered files — like image frames in animations — and unless you pad the numbers with zeros, all to the same length, the files will display out of order under the simple system. So, people demanded this “bug” be “fixed”.

How much choice do we have? From the above Microsoft article, it appears that you can shut the feature off with a bit of tinkering in the Registry. There might also be a way to turn it off in MacOS X — but if so, it’s probably a similar kind of hack, since the Finder preferences don’t provide the option.

I haven’t taken note what KDE or Gnome do, but I’ll bet they default to similar behavior. It seems to be what the people want.

A similar method is used for Cutter numbers, which are used in Library of Congress call numbers. It isn’t derived from that exact pattern, but it looks like it in practice.

In that case, the number always follows a letter, and is actually a method of encoding letters in an author’s name into digits. The first digit’s magnitude determines the ordering of the number. Also, originally a two-digit number was used, but three digits are also used. The three-digit numbers work so that they will fit in between the two-digit numbers.

LoC Call numbers begin with letters too, but this is a separate system, which has a two-letter prefix indicating subject, followed by a number which further refines the subject. Those numbers are ranked numerically.

As an example, this indicates proper ordering (the Cutter numbers are all after the space):

QA24 W65

QA141.3 S251

QA141.3 S29

QA141.3 S45

QS140.5 T31

Note that the only time it gets down to that level is when you have two or more authors who have written books on the exact same subject, and have names that start with the same letter.

Actually, I think you can dispense with the “number of digits” part. After sorting on leading digit, they are just sorting numerically.

I can see somebody doing this if they are filing papers in folders marked “1 street addresses”, “2 street addresses”, etc, then sorting the addresses numerically in each folder.