Numerical and Chronological Order
Strings representing numbers may be sorted based on the values of the numbers that they represent. For example, "-4", "2.5", "10", "89", "30,000". Note that pure application of this method may provide only a partial ordering on the strings, since different strings can represent the same number (as with "2" and "2.0", or when scientific notation is used, "2e3" and "2000").
A similar approach may be taken with strings representing dates or other items that can be ordered chronologically or in some other natural fashion.
Read more about this topic: Collating Sequence
Famous quotes containing the words numerical and/or order:
“The terrible tabulation of the French statists brings every piece of whim and humor to be reducible also to exact numerical ratios. If one man in twenty thousand, or in thirty thousand, eats shoes, or marries his grandmother, then, in every twenty thousand, or thirty thousand, is found one man who eats shoes, or marries his grandmother.”
—Ralph Waldo Emerson (18031882)
“Put shortly, these are the two views, then. One, that man is intrinsically good, spoilt by circumstance; and the other that he is intrinsically limited, but disciplined by order and tradition to something fairly decent. To the one party mans nature is like a well, to the other like a bucket. The view which regards him like a well, a reservoir full of possibilities, I call the romantic; the one which regards him as a very finite and fixed creature, I call the classical.”
—Thomas Ernest Hulme (18831917)