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

Difference between revisions of "Template:Values"

From ModEnc
Jump to: navigation, search
m (Reverted edits by Vinifera7 (Talk); changed back to last version by DCoder)
m (Trying not to break the template... Leptons removed. Other small changes.)
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.
 
|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.
 
|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]])
 
|unsigned byte
 
|unsigned byte
 
|unsigned bytes
 
|unsigned bytes
 
|byte
 
|byte
|bytes = [[Help:Values#Bytes|Unsigned Bytes:]] All whole numbers from 0 to 255.
+
|bytes = [[Help:Values#Bytes|Unsigned Bytes]]: All whole numbers from 0 to 255.
 
|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}}})}}
 
|stringlist
 
|stringlist
 
|listofstrings = {{{separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
 
|listofstrings = {{{separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]. {{#if: {{{2|}}} | (Limited to: {{{2}}})}}
Line 25: Line 28:
 
|clsids
 
|clsids
 
|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.
|lepton
+
|percent
|leptons = [[Lepton|Leptons:]] Whole numbers - 1 lepton is 1/256th of a map cell.
+
|percents
 
|percentage
 
|percentage
 
|percentages
 
|percentages
|% = [[Help:Values#Percentages|Percentages:]] Either a direct percentage (e.g. "50%"), or a [[Help:Values#Floating Point Values|floating point value]] (e.g. "0.5").
+
|% = [[Help:Values#Percentages|Percentages]]: Either a direct percentage (e.g. "50%"), or a [[Help:Values#Floating Point Values|floating point value]] (e.g. "0.5").
|special = Values that don't conform to any typical format (see below)
+
|special = Values that don't conform to any typical format (see article)
|#default = Warning - unknown value type selected! Please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] this page and fix the [[Template:Values|Values template]]!
+
|#default = Warning: Unknown value type selected! Please [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit] this page and fix the [[Template:Values|Values template]].
 
}}</includeonly><noinclude>This template generates standardized value type descriptions for a number of common types, to be used in the <code>values=</code> parameter of [[Template:Flag]].
 
}}</includeonly><noinclude>This template generates standardized value type descriptions for a number of common types, to be used in the <code>values=</code> parameter of [[Template:Flag]].
  
Line 38: Line 41:
 
<pre>{{Values|VALUE TYPE}}</pre>
 
<pre>{{Values|VALUE TYPE}}</pre>
  
 
+
<code></code>
  
 
Currently valid value types are:
 
Currently valid value types are:
*<code>signed integers</code> '''or''' <code>integers</code>
+
* [[Help:Values#Integers|Signed integers]]: <code>signed integers</code>, <code>signed integer</code>, <code>integers</code>, <code>integer</code>, or <code>int</code>
*<code>unsigned integers</code>
+
* [[Help:Values#Integers|Unsigned integers]]: <code>unsigned integers</code> or <code>unsigned integer</code>
*<code>floats</code>
+
* [[Help:Values#Floating Point Values|Floating point values]]: <code>floats</code> or <code>float</code>
*<code>unsigned bytes</code> '''or''' <code>bytes</code>
+
* [[Help:Values#Bytes|Unsigned Bytes]]: <code>unsigned bytes</code>, <code>unsigned byte</code>, <code>bytes</code>, or <code>byte</code>
*<code>signed bytes</code>
+
* [[Help:Values#Bytes|Signed Bytes]]: <code>signed bytes</code> or <code>signed byte</code>
*<code>booleans</code>
+
* [[Help:Values#Boolean values|Boolean values]]: <code>booleans</code>, <code>boolean</code>, or <code>bool</code>
*<code>strings</code>
+
* [[Help:Values#Strings|Strings]]: <code>strings</code>, <code>string</code>, or <code>str</code>
*<code>stringlist</code> '''or''' <code>listofstrings</code>
+
* {{{separator|Comma}}}-separated list of [[Help:Values#Strings|strings]]: <code>stringlist</code> or <code>listofstrings</code>
*<code>colors</code>
+
* [[Help:Values#Colors|Colors]]: <code>colors</code> or <code>color</code>
*<code>clsids</code> '''or''' <code>locomotors</code>
+
* [[Help:Values#CLSIDs/Locomotors|CLSIDs]]: <code>clsids</code>, <code>clsid</code>, <code>locomotors</code>, or <code>locomotor</code>
*<code>leptons</code>
+
* [[Help:Values#Percentages|Percentages]]: <code>percentages</code>, <code>percentage</code>, <code>percents</code>, <code>percent</code>, or <code>%</code>
*<code>percentages</code>
+
* Non conforming values: <code>special</code>
*<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 19:52, 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:

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)

".