|
|
Line 5: |
Line 5: |
| <!-- Please, don't delete the text above this comment, start testing below--> | | <!-- Please, don't delete the text above this comment, start testing below--> |
|
| |
|
| {|
| |
| |- style="vertical-align:top;"
| |
| |
| |
| {|class="wikitable sortable"
| |
| !numbers
| |
| |-
| |
| |123,456,789
| |
| |-
| |
| |2,500,000,000
| |
| |-
| |
| |300,000,000
| |
| |-
| |
| |3,000,000 abc
| |
| |-
| |
| |5,000,000
| |
| |-
| |
| |2,000 def
| |
| |-
| |
| | -4,000
| |
| |-
| |
| | ghi
| |
| |-
| |
| | -9,999
| |
| |-
| |
| |4,000
| |
| |-
| |
| |9,999
| |
| |-
| |
| |800,000
| |
| |-
| |
| |900,000
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !numbers
| |
| |-
| |
| |123 564,589.7e12
| |
| |-
| |
| |9
| |
| |-
| |
| | -80
| |
| |-
| |
| |80 abc 5
| |
| |-
| |
| |abc 80
| |
| |-
| |
| |70
| |
| |-
| |
| |600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !first alphabetic, later also numeric mode
| |
| |-
| |
| |123.4 ghi
| |
| |-
| |
| |2,500,000,000
| |
| |-
| |
| |300,000,000
| |
| |-
| |
| |3,000,000 abc
| |
| |-
| |
| |5,000,000
| |
| |-
| |
| |2,000 def
| |
| |-
| |
| |4,000
| |
| |-
| |
| |9,999
| |
| |-
| |
| |800,000
| |
| |-
| |
| |900,000
| |
| |}
| |
| |}
| |
|
| |
| {|
| |
| |- style="vertical-align:top;"
| |
| |
| |
| {|class="wikitable sortable"
| |
| !currencies
| |
| |-
| |
| |$ 9
| |
| |-
| |
| |$ 80
| |
| |-
| |
| |$ 70
| |
| |-
| |
| |$ 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !currencies
| |
| |-
| |
| |€ 9
| |
| |-
| |
| |€ 80
| |
| |-
| |
| |€ 70
| |
| |-
| |
| |€ 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !currencies
| |
| |-
| |
| |£ 9
| |
| |-
| |
| |£ 80
| |
| |-
| |
| |£ 70
| |
| |-
| |
| |£ 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !currencies
| |
| |-
| |
| |¥ 9
| |
| |-
| |
| |¥ 80
| |
| |-
| |
| |¥ 70
| |
| |-
| |
| |¥ 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !comparison
| |
| |-
| |
| |a 9
| |
| |-
| |
| |a 80
| |
| |-
| |
| |a 70
| |
| |-
| |
| |a 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !comparison
| |
| |-
| |
| |e 9
| |
| |-
| |
| |e 80
| |
| |-
| |
| |e 70
| |
| |-
| |
| |e 600
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !"currency" mode
| |
| |-
| |
| |9{{smc}}
| |
| |-
| |
| |circa 80{{smc}}
| |
| |-
| |
| |7089{{smc}}
| |
| |-
| |
| |70 90{{smc}}
| |
| |-
| |
| |70 91{{smc}}
| |
| |-
| |
| |70 89{{smc}}
| |
| |-
| |
| |70 to 90{{smc}}
| |
| |-
| |
| |7091{{smc}}
| |
| |-
| |
| |600{{smc}}
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !"currency" mode ("ca. 80" sorts at 0 due to dot)
| |
| |-
| |
| |9{{smc}}
| |
| |-
| |
| |ca. 80{{smc}}
| |
| |-
| |
| |7089{{smc}}
| |
| |-
| |
| |70 to 90{{smc}}
| |
| |-
| |
| |7091{{smc}}
| |
| |-
| |
| |600{{smc}}
| |
| |}
| |
| |}
| |
|
| |
| The example with "a" gives alphabetic sorting; that with "e" ditto, the data are not mistaken for numbers in scientific format.
| |
|
| |
| {|
| |
| |- style="vertical-align:top;"
| |
| |
| |
| {|class="wikitable sortable"
| |
| !mixed notations
| |
| |-
| |
| | 12 or 13 sm=n
| |
| |-
| |
| | -12 (retrograde)
| |
| |-
| |
| | 12 (?)
| |
| |-
| |
| | ca. 12
| |
| |-
| |
| | ?
| |
| |-
| |
| | {{#expr:1000000000000000000/7}}
| |
| |-
| |
| | 1000000000000000000
| |
| |-
| |
| | -1000000000000000000
| |
| |-
| |
| | .0000000000000000001
| |
| |-
| |
| | -.0000000000000000001
| |
| |-
| |
| | {{#expr:-1000000000000000000/7}}
| |
| |-
| |
| | {{#expr:.000000000001/7}}
| |
| |-
| |
| | {{#expr:-.000000000001/7}}
| |
| |-
| |
| |89 123 456 788
| |
| |-
| |
| |89,123,456,789
| |
| |-
| |
| |333
| |
| |-
| |
| |1e10
| |
| |-
| |
| |e 9
| |
| |-
| |
| |e 80
| |
| |-
| |
| |e 70
| |
| |-
| |
| |e 600
| |
| |-
| |
| |999e9
| |
| |-
| |
| |88e80
| |
| |-
| |
| |7e270
| |
| |-
| |
| |999e-9
| |
| |-
| |
| |88e-80
| |
| |-
| |
| |7e-270
| |
| |-
| |
| |4{{e|12}}
| |
| |-
| |
| | -999e9
| |
| |-
| |
| | −999e9
| |
| |-
| |
| | -88e80
| |
| |-
| |
| | -7e270
| |
| |-
| |
| | -999e-9
| |
| |-
| |
| | -88e-80
| |
| |-
| |
| | -7e-270
| |
| |-
| |
| |e3
| |
| |-
| |
| | -e3
| |
| |-
| |
| |1e3
| |
| |-
| |
| |e9
| |
| |-
| |
| |e80
| |
| |-
| |
| |e270
| |
| |-
| |
| |2{{e|12}}
| |
| |-
| |
| |7{{e|11}}
| |
| |-
| |
| |6e11
| |
| |-
| |
| |8e11
| |
| |-
| |
| |7{{e|-11}}
| |
| |-
| |
| | -7{{e|11}}
| |
| |-
| |
| | -7{{e|-11}}
| |
| |-
| |
| |3{{e|2}}
| |
| |-
| |
| |4{{e|2}}
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !first number in each element counts
| |
| |-
| |
| |7-4
| |
| |-
| |
| |2
| |
| |-
| |
| |4
| |
| |-
| |
| |22/7
| |
| |-
| |
| |111
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !percentage
| |
| |-
| |
| |7%
| |
| |-
| |
| |2
| |
| |-
| |
| |4
| |
| |-
| |
| |22
| |
| |-
| |
| |111
| |
| |}
| |
| |
| |
| {|class="wikitable sortable"
| |
| !mixed notations
| |
| |-
| |
| | 14
| |
| |-
| |
| | -14
| |
| |-
| |
| | 11
| |
| |-
| |
| | -12 (retrograde)
| |
| |-
| |
| | 12 or 13
| |
| |-
| |
| | 12 (?)
| |
| |-
| |
| | ca. 12
| |
| |-
| |
| | 12 (approx.)
| |
| |-
| |
| | ?
| |
| |}
| |
| |}
| |
|
| |
| The first example demonstrates that text is positioned at zero, and that e.g. e3 for 1000 is not allowed; use 1e3 instead. Using {{tim|e}}, a number in scientific notation can be displayed with a superscript, while still allowing numeric sorting (compare the method described in the next section). It also shows that "-" should be used, not "−". The first element "12 or 13 sm=n" has a visible "sm=n", although it is normally made invisible; when this element is at the top, numeric sorting mode applies.
| |
|
| |
| The second example shows that expressions are not sorted according to their evaluated value, but according to the first number.
| |
|
| |
| The third example shows that a percentage is accepted for numeric sorting mode, but ignored in the actual sorting, so if a column contains percentages, ''all'' numbers have to be written as a percentage.
| |
|
| |
| The fourth example shows again that "ca. 12" sorts at 0, as opposed to 12 with some text after it, which sorts at 12. In the latter case an invisible "sm=n" needs to be put at the end, in case such an element arrives at the top of a column, which would otherwise cause alphabetic sorting mode.
| |
|
| |
|
| Sortable version of {{mlw|Template:Climate in Middle East cities}}, using smn to specify numeric sort mode: | | Sortable version of {{mlw|Template:Climate in Middle East cities}}, using smn to specify numeric sort mode: |