Template:Values: Difference between revisions
Appearance
en>DCoder m Adding list of integers |
Added color list value type |
||
| (3 intermediate revisions by 3 users not shown) | |||
| Line 5: | Line 5: | ||
|integer | |integer | ||
|integers = [[Help:Values#Integers|Signed integers]]: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | |integers = [[Help:Values#Integers|Signed integers]]: All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | ||
|uint | |||
|unsigned integer | |unsigned integer | ||
|unsigned integers = [[Help:Values#Integers|Unsigned integers]]: All non-negative whole numbers from 0 to either 32767, 2147483647 or | |unsigned integers = [[Help:Values#Integers|Unsigned integers]]: All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967295. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | ||
|float | |float | ||
|floats = [[Help:Values#Floating Point Values|Floating point values]]: Any decimal number (clearer range should be added in [[Template:Values]]). {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | |floats = [[Help:Values#Floating Point Values|Floating point values]]: Any decimal number (clearer range should be added in [[Template:Values]]). {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | ||
| Line 27: | Line 28: | ||
|color | |color | ||
|colors = [[Help:Values#Colors|Colors]]: {{#switch: {{lc:{{{2}}}}} |rgb = R,G,B |hsb = H,S,B |#default = R,G,B}} format | |colors = [[Help:Values#Colors|Colors]]: {{#switch: {{lc:{{{2}}}}} |rgb = R,G,B |hsb = H,S,B |#default = R,G,B}} format | ||
|colorlist | |||
|listofcolors = {{{separator|Comma}}}-separated list of [[Help:Values#Colors|colors]]. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | |||
|clsid | |clsid | ||
|clsids | |clsids | ||
| Line 55: | Line 58: | ||
|- | |- | ||
|[[Help:Values#Integers|Unsigned integers]] | |[[Help:Values#Integers|Unsigned integers]] | ||
|<code>unsigned integers</code> | |<code>unsigned integers</code>, <code>unsigned integer</code>, or <code>uint</code> | ||
|- | |- | ||
|[[Help:Values#Floating Point Values|Floating point values]] | |[[Help:Values#Floating Point Values|Floating point values]] | ||
| Line 80: | Line 83: | ||
|[[Help:Values#Colors|Colors]] | |[[Help:Values#Colors|Colors]] | ||
|<code>colors</code> or <code>color</code> | |<code>colors</code> or <code>color</code> | ||
|- | |||
|List of [[Help:Values#Colors|colors]] | |||
|<code>colorlist</code> or <code>listofcolors</code> | |||
|- | |- | ||
|[[Help:Values#CLSIDs/Locomotors|CLSIDs]] | |[[Help:Values#CLSIDs/Locomotors|CLSIDs]] | ||
Latest revision as of 14:30, 21 April 2025
This template generates standardized value type descriptions for a number of common types, to be used in the values= parameter of Template:Flag.
Usage
{{Values|VALUE TYPE}}
| Value Type | Codes |
|---|---|
| Signed integers | signed integers, signed integer, integers, integer, or int
|
| Unsigned integers | unsigned integers, unsigned integer, or uint
|
| Floating point values | floats or float
|
| Unsigned Bytes | unsigned bytes, unsigned byte, bytes, or byte
|
| Signed Bytes | signed bytes or signed byte
|
| Boolean values | booleans, boolean, or bool
|
| Strings | strings, string, or str
|
| List of strings | stringlist or listofstrings
|
| List of integers | intlist or listofints
|
| Colors | colors or color
|
| List of colors | colorlist or listofcolors
|
| CLSIDs | clsids, clsid, locomotors, or locomotor
|
| Percentages | percentages, percentage, percents, percent, or %
|
| Non conforming values | special
|
In the case of strings and stringlist, a second parameter can be added to note what the strings are limited to. For example:
{{Values|stringlist|[[Animations]]}}
yields "Comma-separated list of strings. (Limited to: Animations)
".
The list separator defaults to "Comma", but can also be explicitly stated in the following way:
{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}
This yields "Whitespace-separated list of strings. (Limited to: Sound filenames)
".