Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Val/units/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Scale ==== For scaling a unit to sort properly, you need to pick a number for a sorting factor. There are numerous examples at [[Template:Val/list]] and at [[Template:Val/sortkey/unit]]. A [[system of units]] will have its base units, for example 1 bit; then the scale for sorting a kilobyte unit is then 8000 (eight bits per byte, times a kilo, or thousand). Or a year scale is seconds so that all ''times'' sort by seconds, which is a base unit. In general the scale shows to be "base unit" of the same type times the "SI prefix", and if it's not that simple, then the unit system's number has associated a number to it, such as Avogadro's number. For example, the following defines a unit with code <kbd>billion</kbd>, symbol <kbd>billion</kbd>, link [[1,000,000,000]], and scale <kbd>1e9</kbd> ({{val|1|e=9}}). After the following entry is saved to the database <pre> billion billion 1,000,000,000 1e9 </pre> <nowiki>{{val|2|u=billion}}</nowiki> would start sorting after <nowiki>{{val|98.7|e=3}}</nowiki>.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)