FormatFlags
Public / Constants
Digits
Specifies the digit count to use for integer values.
When no Exponent is given, the count gives the minimum number of digits to use for formatting. Small values are padded with zeros to the left.
- See also
Digits1
Specifies the minimum number of digits (1
) to use when formatting integer values.
This flag is set by default.
- See also
Digits10
Specifies the minimum number of digits (10
) to use when formatting integer values.
- See also
Digits11
Specifies the minimum number of digits (11
) to use when formatting integer values.
- See also
Digits12
Specifies the minimum number of digits (12
) to use when formatting integer values.
- See also
Digits13
Specifies the minimum number of digits (13
) to use when formatting integer values.
- See also
Digits14
Specifies the minimum number of digits (14
) to use when formatting integer values.
- See also
Digits15
Specifies the minimum number of digits (15
) to use when formatting integer values.
- See also
Digits16
Specifies the minimum number of digits (16
) to use when formatting integer values.
- See also
Digits17
Specifies the minimum number of digits (17
) to use when formatting integer values.
- See also
Digits18
Specifies the minimum number of digits (18
) to use when formatting integer values.
- See also
Digits19
Specifies the minimum number of digits (19
) to use when formatting integer values.
- See also
Digits20
Specifies the minimum number of digits (20
) to use when formatting integer values.
- See also
Precision7
Floating-point numbers are output using 7 significant decimal digits.
Converting a string that has been output with Precision7 to a 32-bit floating point number will yield the same string when formatted again with the same precision.
Precision9
Floating-point numbers are output using 9 significant decimal digits.
Formatting a 32-bit floating point number with Precision9 and converting the resulting string back again will yield the same 32-bit floating point number.
Precision15
Floating-point numbers are output using 15 significant decimal digits.
Converting a string that has been output with Precision15 to a 64-bit floating point number will yield the same string when formatted again with the same precision.
This flag is set by default.
Precision17
Floating-point numbers are output using 17 significant decimal digits.
Formatting a 32-bit floating point number with Precision17 and converting the resulting string back again will yield the same 64-bit floating point number.
NumberBaseDecimal
Format signed integer numbers with the decimal number base.
This flag is set by default.
NumberBaseHexadecimal
Format unsigned integer numbers with the hexadecimal number base.
The Exponent flags will be ignored when this flag is set.
NumberBaseOctal
Format unsigned integer numbers with the octal number base.
The Exponent flags will be ignored when this flag is set.
Exponent
Specifies the decimal exponent to use for formatting integer values.
Formatting an integer 123456
with exponent flags has the following result:
Exponent = 5 : '1.23456E+10' = 4 : '1.23456E+9' = 3 : '123456000' = 2 : '12345600' = 1 : '1234560' = 0 : '123456' = -1 : '12345.6' = -2 : '1234.56' = -3 : '123.456' = -4 : '12.3456' = -5 : '1.23456' = -6 : '0.123456' = -7 : '0.0123456' = -8 : '1.23456E-3' = -9 : '1.23456E-4'
The non-exponent syntax will be chosen if it is shorter than the exponent syntax. This behaviour can be overridden by specifying a Digits flag: Then the exponent syntax is only considered if the number of output digits is equal to or greater than the given digit count.
- See also