ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Values: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Vinifera7 (talk | contribs)
m Trying not to break the template... Leptons removed. Other small changes.
Vinifera7 (talk | contribs)
m Tabular formatting.
Line 17: Line 17:
|bool
|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
|str
|string
|string
Line 41: Line 41:
<pre>{{Values|VALUE TYPE}}</pre>
<pre>{{Values|VALUE TYPE}}</pre>


<code></code>


Currently valid value types are:
{| align="center" cellpadding="4" class="table_descrow"
* [[Help:Values#Integers|Signed integers]]: <code>signed integers</code>, <code>signed integer</code>, <code>integers</code>, <code>integer</code>, or <code>int</code>
|+'''Valid Value Type Codes'''
* [[Help:Values#Integers|Unsigned integers]]: <code>unsigned integers</code> or <code>unsigned integer</code>
!Value Type
* [[Help:Values#Floating Point Values|Floating point values]]: <code>floats</code> or <code>float</code>
!Codes
* [[Help:Values#Bytes|Unsigned Bytes]]: <code>unsigned bytes</code>, <code>unsigned byte</code>, <code>bytes</code>, or <code>byte</code>
|-
* [[Help:Values#Bytes|Signed Bytes]]: <code>signed bytes</code> or <code>signed byte</code>
|[[Help:Values#Integers|Signed integers]]
* [[Help:Values#Boolean values|Boolean values]]: <code>booleans</code>, <code>boolean</code>, or <code>bool</code>
|<code>signed integers</code>, <code>signed integer</code>, <code>integers</code>, <code>integer</code>, or <code>int</code>
* [[Help:Values#Strings|Strings]]: <code>strings</code>, <code>string</code>, or <code>str</code>
|-
* {{{separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]: <code>stringlist</code> or <code>listofstrings</code>
|[[Help:Values#Integers|Unsigned integers]]
* [[Help:Values#Colors|Colors]]: <code>colors</code> or <code>color</code>
|<code>unsigned integers</code> or <code>unsigned integer</code>
* [[Help:Values#CLSIDs/Locomotors|CLSIDs]]: <code>clsids</code>, <code>clsid</code>, <code>locomotors</code>, or <code>locomotor</code>
|-
* [[Help:Values#Percentages|Percentages]]: <code>percentages</code>, <code>percentage</code>, <code>percents</code>, <code>percent</code>, or <code>%</code>
|[[Help:Values#Floating Point Values|Floating point values]]
* Non conforming values: <code>special</code>
|<code>floats</code> or <code>float</code>
|-
|[[Help:Values#Bytes|Unsigned Bytes]]
|<code>unsigned bytes</code>, <code>unsigned byte</code>, <code>bytes</code>, or <code>byte</code>
|-
|[[Help:Values#Bytes|Signed Bytes]]
|<code>signed bytes</code> or <code>signed byte</code>
|-
|[[Help:Values#Boolean values|Boolean values]]
|<code>booleans</code>, <code>boolean</code>, or <code>bool</code>
|-
|[[Help:Values#Strings|Strings]]
|<code>strings</code>, <code>string</code>, or <code>str</code>
|-
|{{{separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]
|<code>stringlist</code> or <code>listofstrings</code>
|-
|[[Help:Values#Colors|Colors]]
|<code>colors</code> or <code>color</code>
|-
|[[Help:Values#CLSIDs/Locomotors|CLSIDs]]
|<code>clsids</code>, <code>clsid</code>, <code>locomotors</code>, or <code>locomotor</code>
|-
|[[Help:Values#Percentages|Percentages]]
|<code>percentages</code>, <code>percentage</code>, <code>percents</code>, <code>percent</code>, or <code>%</code>
|-
|Non conforming values
|<code>special</code>
|}


In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to. For example:
In the case of <code>strings</code> and <code>stringlist</code>, a second parameter can be added to note what the strings are limited to. For example:

Revision as of 18:04, 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}}


Valid Value Type Codes
Value Type Codes
Signed integers signed integers, signed integer, integers, integer, or int
Unsigned integers unsigned integers or unsigned integer
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
Comma-separated list of strings stringlist or listofstrings
Colors colors or color
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)".

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)".