Talɣa:Val

Si Wikipedia, tasanayt tilellit.
Sauter à la navigation Sauter à la recherche
Tumlin Tumlin[snulfu] [senger]

Asemres[ẓreg aɣbalu]

This template is used to easily present values in Tira tussnant, including uncertainty and/or units, as prescribed by Wikipedia's Manual of Style. It wraps the entire result in a {{Nowrap}} block, so that it never gets broken into separate pieces at the end of a line. (See Wikipedia:Amsisi n waɣan for more information on the usage of non-breaking spaces.)

Arguments[ẓreg aɣbalu]

There are four ways this template can be used:

  • {{val|number}} - for displaying values without uncertainty/significance.
  • {{val|number|uncertainty}} - for displaying values with uncertainty like so Erreur de script : le module « val » n’existe pas..
  • {{val|number|upper uncertainty|lower uncertainty}} - for displaying values with uncertainty like so Erreur de script : le module « val » n’existe pas..
  • {{val|number|(significance)}} - for displaying values with significance like so Erreur de script : le module « val » n’existe pas..

They all take roughly the same arguments

1 The value (must be a valid number)
2 The (upper limit of) uncertainty (must be a valid number) or significance (must be a valid number in parenthesis)
3 The lower limit of uncertainty (must be a valid negative number)
e The exponent for the power of 10 (optional). This will show up in the result as " × 10Erreur de script : le module « Su » n’existe pas.".
Values (arguments 1-3 and e) are run through code copied from {{delimitnum}} for readability, except for argument 2 when it is surrounded by parenthesis. This currently causes an error for large numbers, numbers that require high precision and numbers that have zeros after the decimal point. This last issue is being addressed, the other issues require changes to the Wikipedia software.
u / ul The units for the number (optional, with/without a link to the page about the unit respectively).
up / upl The units per for the units (optional, requires u to be specified, with/without a link to the page about the unit respectively).
Units (specified by u, ul, up and upl) are replaced by a more aesthetically pleasing HTML representation and get a link (ul and upl only, if they are in the list found in {{tigget:Val/units}} or if they are supported by {{ɣef}}). You can specify units using just u; a good example is "ul=m/s", which gets translated to "m deg tsint", or you can use u and up, as in "u/up"; a good examples if "ul=m|up=s", which gets translated to "m/s".
p A prefix for the value (such as ∆, ⌀, etc.; optional).
s A suffix for the value (such as %, optional).
Prefixes (specified by p) and suffixes (specified by s) are put in front of or behind the value as is: this includes spaces. They are inside the nowrap block and will always be on the same line as the value. The parameters that previously provided this functionality (h for header and f for footer) are deprecated and will be ignored.
end Appends something after the main value. For example, {{val|123.24|end=...}} gives Erreur de script : le module « val » n’existe pas.
errend Appends something after the uncertainty. For example, {{val|123.23|end=...|2.34|errend=...}} gives Erreur de script : le module « val » n’existe pas.
+errend & -errend Appends something after the positive/negative uncertainties. For example, {{val|123.23|end=...|+2.34|+errend=...|-1.23|-errend=...}} gives Erreur de script : le module « val » n’existe pas.
nocategory If set to any value, errors in the use of this template will not cause the page to be added to the category. This is useful for documentation and test pages that do not need to be fixed.

See {{val/test}} for a list of examples of the correct output of {{val}} and the errors it may return when incorrectly used.