Template:MessageFormatting
Revision as of 04:19, 10 June 2006 by imported>JOG (Use same template for Message and Messagebox)
Formatting notation
%.2f
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:
Number 12 wins Number 1234 wins
Formating switches
The following formatting switches can be used in Oblivion. Put them in any sequence right after the '%'
Switch | Function |
---|---|
+ | Display + in front of positive numbers |
<Space> | Leave a leading space in front of positive numbers |
- | Use left-aligned formation instead of right alligned. |
0 | The filling-char used for formatting is '0' instead of ' ' |
Other Functions
%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)
%.3e
Shows numbers in scientific notation (123000 = 1.23E+005)
%%
Use this to display a percent-sign in the message