Template:Datacalc

De Valve Developer Community
Ir a la navegación Ir a la búsqueda
Todo: Implement a input filesize parameter that determines the exponentiation of the output filesize.
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngDocumentación de las plantillas [ver] [editar] [crear Español (es)]
Icon-translate.png Available doc translations
Info.png
La página de documentación Template:Datacalc/doc/es no existe.
La documentación en inglés se mostrará en su lugar, pudiendo usar el traductor de Google (o un software similar) para traducir esta página. Si no aparece nada tras este mensaje, es que la documentación no existe ni en inglés.

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

{{Datacalc | 1 = | output = }}

Usage & Preview

{{Datacalc}}
Parameter Description Example Preview
No parameters Template defaults to displaying 0 bytes
N/A
0 bytes
{{{1}}} Input string, interpreted by default as bytes.
| 1 = 1000
1000 bytes
{{{id}}} Specifies what to do with the identifier.
| id = abbreviate

| id = none
1000 B
1000
{{{prefix}}} Unit prefix; determinant for exponential power.
| prefix = binary
0.9765625 kibibytes
{{{round}}} Used to round up the output string to the specified power.
| round = 2
0.98 kibibytes
{{{output}}} Output filesize, i.e.: kilobytes.
| output = kb
1 kilobytes

Examples

Non-exponential input
1 kilobytes
input: {{datacalc|1000|output=kb}}


Non-exponential input by the second power
0.9765625 kibibytes
input: {{datacalc|1000|output=kb|prefix=binary}}


Exponential input
1 kilobytes
input: {{datacalc|10^3|output=kb}}


Exponential input by the second power
0.9765625 kibibytes
input: {{datacalc|10^3|output=kb|prefix=binary}}

Filesize with the unit identifier abbreviated
1 kB
input: {{datacalc|1000|output=kb|id=abbreviate}}


Filesize without the unit identifier
1
input: {{datacalc|1000|output=kb|id=none}}


Rounded up to 11/2 power
1 kibibytes
input: {{datacalc|1000|output=kb|prefix=binary|round=1.5}}


Rounded up to the second power
0.98 kibibytes
input: {{datacalc|1000|output=kb|prefix=binary|round=2}}

Template:Datacalc
Logo-template.png
Resumen
Converts a filesize string
Tipo
Mathematics template
Colaboradores
Fecha de creación
02/06/2023
(02 June 2022)
Notes
N/D
Subpáginas
Documentación
Precarga
N/D
Terreno de pruebas
N/D
Cadenas
N/D
Pruebas
N/D
Otros
N/D
Info. de revisión
Último editor
Mailmanmicky
Última edición
03/06/2023
20230603212609
Tamaño de revisión
2674 bytes
2.674 kilobytes
0.002674 megabytes
Info. técnica
Identif. de página
53968
Contiene traducciones
No
¿Usa funciones de análisis?
Yes
¿Usa variables?
No