Template:Datacalc/doc: Difference between revisions
Jump to navigation
Jump to search
Mailmanmicky (talk | contribs) m (→Copy and Paste) |
Mailmanmicky (talk | contribs) mNo edit summary |
||
Line 28: | Line 28: | ||
! style="width:40%;" | {{Dictionary/common|Example}} | ! style="width:40%;" | {{Dictionary/common|Example}} | ||
! style="width:35%;" | {{Dictionary/common|Preview}} | ! style="width:35%;" | {{Dictionary/common|Preview}} | ||
|- | |||
| ''No parameters'' | |||
| Template defaults to displaying 0 bytes | |||
| {{CodeBlock|margin=5px|N/A}} | |||
| {{datacalc}} | |||
|- | |- | ||
| {{param|1}} | | {{param|1}} | ||
Line 34: | Line 39: | ||
| {{datacalc|1000}} | | {{datacalc|1000}} | ||
|- | |- | ||
| {{param| | | {{param|id}} | ||
| | | Specifies what to do with the identifier. | ||
| {{CodeBlock|margin=5px|<nowiki>| | | {{CodeBlock|margin=5px 5px 0 5px|<nowiki>| id = abbreviate </nowiki>}}<br>{{CodeBlock|margin=0 5px 5px 5px|<nowiki>| id = none </nowiki>}} | ||
| {{datacalc|1000|output=kb}} | | {{datacalc|1000|output=kb|id=abbreviate}}<br>{{datacalc|1000|output=kb|id=none}} | ||
|- | |- | ||
| {{param|prefix}} | | {{param|prefix}} | ||
Line 48: | Line 53: | ||
| {{CodeBlock|margin=5px|<nowiki>| round = 2 </nowiki>}} | | {{CodeBlock|margin=5px|<nowiki>| round = 2 </nowiki>}} | ||
| {{datacalc|1000|output=kb|prefix=binary|round=2}} | | {{datacalc|1000|output=kb|prefix=binary|round=2}} | ||
|- | |||
| {{param|output}} | |||
| Input filesize, i.e.: kilobytes. | |||
| {{CodeBlock|margin=5px|<nowiki>| output = kb </nowiki>}} | |||
| {{datacalc|1000|output=kb}} | |||
|- | |- | ||
|} | |} | ||
{{clr}} | {{clr}} |
Revision as of 13:03, 1 June 2023

This is a documentation subpage for Template:Datacalc.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Template:Datacalc
Summary
Converts a filesize string
Type
Mathematics template
Contributors
Creation date
02/06/2023
(02 June 2022)
(02 June 2022)
Notes
N/A
Subpages
Documentation
Preload
N/A
Sandbox
N/A
Strings
N/A
Testcases
N/A
Other
N/A
Revision information
Latest editor
Mailmanmicky
Last edited
01/06/2023
20230601130340
20230601130340
Revision size
1943 bytes
1.943 kilobytes
0.001943 megabytes
1.943 kilobytes
0.001943 megabytes
Technical information
Page identifier
53975
Contains translations
No
Uses parser functions?
Yes
Uses variables?
No
This template interprets a numbered input string (in bytes) and converts it into a specified output filesize. For a logical use-case, see Template:Infobox template.
Copy and Paste
Usage & Preview
Parameter | Description | Example | Preview |
---|---|---|---|
No parameters | Template defaults to displaying 0 bytes | 0 bytes | |
{{{1}}} | Input string, interpreted by default as bytes. | 1000 bytes | |
{{{id}}} | Specifies what to do with the identifier. | 1 kB 1 | |
{{{prefix}}} | Unit prefix; determinant for exponential power. | 0.9765625 kibibytes | |
{{{round}}} | Used to round up the output string | 0.98 kibibytes | |
{{{output}}} | Input filesize, i.e.: kilobytes. | 1 kilobytes |