This wiki is a copy of the original Oblivion CS wiki created and maintained by the UESP.net. See CSwiki:Copy Notice for more info.

Difference between revisions of "Template:MessageFormatting"

Jump to navigation Jump to search
5 bytes removed ,  16:33, 12 August 2008
updated to match OBSE format specifier formatting
imported>Haama
(Added to Function Info Templates category)
imported>Quetzilla
(updated to match OBSE format specifier formatting)
Line 1: Line 1:
===Formatting notation===
===Formatting notation===


'''%.2f'''  
'''%.2f''' - This means format the variable with 2 decimal places.


This means format the variable with 2 decimal places.  
'''%.0f''' - This will format the variable with 0 decimal places, so is the normal choice for integers.  


 
'''%5.0f''' - The number in front of the point specifies the minimum width of the number. In this case, there will always be enough space in front of the number for 5 digits:
'''%.0f'''
 
This will format the variable with 0 decimal places, so is the normal choice for integers.
 
 
'''%5.0f'''
 
The number in front of the point specifies the minimum width of the number. In this case, there will always be enough space in front of the number for 5 digits:
  Number    12 wins
  Number    12 wins
  Number  1234 wins
  Number  1234 wins


===Formating switches===
===Formating switches===
Line 39: Line 29:
|The filling-char used for formatting is '0' instead of ' '
|The filling-char used for formatting is '0' instead of ' '
|}
|}


===Other Functions===
===Other Functions===


'''%g'''
'''%g''' - This usually works just like "%.0f", displaying 0 decimal places. When the number is 1000000 or larger, though, the game diplays it in scientific notation (1E+006)
 
This usually works just like "%.0f", displaying 0 decimal places. When the number is 1000000 or larger, though, the game diplays it in scientific notation (1E+006)
 
 
'''%.3e'''
 
Shows numbers in scientific notation (123000 = 1.23E+005)
 


'''%%'''
'''%.3e''' - Shows numbers in scientific notation (123000 = 1.23E+005)


Use this to display a percent-sign in the message
'''%%''' - Use this to display a percent-sign in the message


<noinclude>[[Category:Function Info Templates]]</noinclude>
<noinclude>[[Category:Function Info Templates]]</noinclude>
Anonymous user

Navigation menu