Jump to content
Main menu
Main menu
move to sidebar
hide
Eya ho
Leqephe la pele
Potjho e kopano
Liphetoho tsa morao-rao
Mpontshe leqephe le leng le le leng
Thusa
Maqephe a khethehileng
Fuputsa
Batla
Appearance
Dimpho
Etsa akhaonto
Ho kena
Lisebelisoa tsa botho
Dimpho
Etsa akhaonto
Ho kena
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Formatnum/doc
Add languages
Module
Moqoqo
Sesotho
Read
Fetola mohloli
Sheba histori
Lisebelisoa
Tools
move to sidebar
hide
Actions
Read
Fetola mohloli
Sheba histori
General
What links here
Liphetoho tse amanang
Kenya faele
Boitsebiso ba Leqephe
Get shortened URL
Download QR code
Appearance
move to sidebar
hide
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!
This module provides a number formatting function. This function can be used from #invoke or from other Lua modules. This module is used by [[Module:Complex date]] == Use from other Lua modules == To use the module from normal wiki pages, no special preparation is needed. If you are using the module from another Lua module, first you need to load it, like this: <syntaxhighlight lang="lua"> local mf = require('Module:Formatnum') </syntaxhighlight> (The <code>mf</code> variable stands for '''M'''odule '''F'''ormatnum; you can choose something more descriptive if you prefer.) Most functions in the module have a version for Lua and a version for #invoke. It is possible to use the #invoke functions from other Lua modules, but using the Lua functions has the advantage that you do not need to access a Lua [[mw:Extension:Scribunto/Lua reference manual#Frame object|frame object]]. Lua functions are preceded by <code>_</code>, whereas #invoke functions are not. == main == {{#invoke:Formatnum|main|''x''|''lang=''|''prec=''|''sep=''}} <syntaxhighlight lang="lua"> mf.formatNum(x, lang, prec, sep) </syntaxhighlight> ==Related pages== {{Math templates}} <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Preview page with this template
Template used on this page:
Template:Math templates
(
fetola
)
Fuputsa
Batla
Editing
Module:Formatnum/doc
Add languages
Add topic