ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Template:Values: Difference between revisions
Jump to navigation
Jump to search
m Fixing space |
m Added limitations for some other value types. |
||
Line 2: | Line 2: | ||
|signed integer | |signed integer | ||
|signed integers | |signed integers | ||
|int | |||
|integer | |integer | ||
|integers = [[Help:Values#Integers|Signed integers:]] All whole numbers from -2147483648 to 2147483647; in rare cases, only from -32768 to 32767. | |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}}})}} | ||
|unsigned integer | |unsigned integer | ||
|unsigned integers = [[Help:Values#Integers|Unsigned integers:]] All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967296. | |unsigned integers = [[Help:Values#Integers|Unsigned integers:]] All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967296. {{#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]]) | |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}}})}} | ||
|unsigned byte | |unsigned byte | ||
|unsigned bytes | |unsigned bytes | ||
Line 14: | Line 15: | ||
|signed byte | |signed byte | ||
|signed bytes = [[Help:Values#Bytes|Signed Bytes:]] All whole numbers from -128 to 127. | |signed bytes = [[Help:Values#Bytes|Signed Bytes:]] All whole numbers from -128 to 127. | ||
|bool | |||
|boolean | |boolean | ||
|booleans = [[Help:Values#Boolean values|Boolean values:]] yes or no, true or false, 1 or 0 | |booleans = [[Help:Values#Boolean values|Boolean values:]] yes or no, true or false, 1 or 0 | ||
|str | |||
|string | |string | ||
|strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | |strings = [[Help:Values#Strings|Strings:]] Normal text. {{#if: {{{2|}}} | (Limited to: {{{2}}})}} | ||
Line 26: | Line 29: | ||
|locomotor | |locomotor | ||
|locomotors = [[Help:Values#CLSIDs/Locomotors|CLSIDs:]] Usually [[Locomotors]], but can be [[AIGenerals|AIGeneral-names]] as well. | |locomotors = [[Help:Values#CLSIDs/Locomotors|CLSIDs:]] Usually [[Locomotors]], but can be [[AIGenerals|AIGeneral-names]] as well. | ||
| | |percent | ||
| | |percents | ||
|percentage | |percentage | ||
|percentages | |percentages | ||
Line 51: | Line 54: | ||
*<code>colors</code> | *<code>colors</code> | ||
*<code>clsids</code> '''or''' <code>locomotors</code> | *<code>clsids</code> '''or''' <code>locomotors</code> | ||
*<code>percentages</code> | *<code>percentages</code> | ||
*<code>special</code> | *<code>special</code> |
Revision as of 17:23, 21 April 2008
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}}
Currently valid value types are:
signed integers
orintegers
unsigned integers
floats
unsigned bytes
orbytes
signed bytes
booleans
strings
stringlist
orlistofstrings
colors
clsids
orlocomotors
percentages
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)".
In cause of stringlist
, an additional argument separator
can be provided. It defaults to "Comma" and describes the separator between the list entries. For example:
{{Values|stringlist|[[Sound filenames]]|separator=Whitespace}}
yields "Whitespace-separated list of strings. (Limited to: Sound filenames)".