உள்ளடக்கத்துக்குச் செல்

Module:Formatnum/doc

கட்டற்ற கலைக்களஞ்சியமான விக்கிப்பீடியாவில் இருந்து.
Balajijagadesh (பேச்சு | பங்களிப்புகள்) பயனரால் செய்யப்பட்ட 09:28, 18 ஆகத்து 2024 அன்றிருந்தவாரான திருத்தம் (en:Module:Formatnum/doc இலிருந்து திருத்தம் இறக்குமதி செய்யப்பட்டன)
(வேறுபாடு) ← பழைய திருத்தம் | புதிய திருத்தத்தைப் பார்க்கவும். (வேறுபாடு) | புதிய திருத்தம் → (வேறுபாடு)

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:

local mf = require('Module:Formatnum')

(The mf variable stands for Module Formatnum; 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 frame object. Lua functions are preceded by _, whereas #invoke functions are not.

{{#invoke:Formatnum|main|x|lang=|prec=|sep=}}
mf.formatNum(x, lang, prec, sep)

See also

[தொகு]

வார்ப்புரு:Math templates


"https://ta.wikipedia.org/w/index.php?title=Module:Formatnum/doc&oldid=4069524" இலிருந்து மீள்விக்கப்பட்டது