|This method is obsolete. See the Remarks section below.|
Utilities.FormatFloat method to convert the specified floating-point value to a string using the format specified by the Format parameter.
The method is applied to the following object:
The method has the following parameters:
Specifies the format to be used for conversion. Format is a string that may include up to three sections separated by semicolons. The first section specifies the format for positive values, the second - for negative values and the third - for zero. The second and third sections can be empty. In this case, the function will use the positive number format for conversion of negative values and zeros. If the first section is empty or the entire format string is empty,
FormatFloat converts the Value using the general number format (that is, a call to
FormatFloat corresponds to a call to
FloatToStrF with the
ffGeneral format specifier).
Each section may hold the following format specifiers:
|0||If the converted number has digit in the position where 0 is specified in the format string, then this digits is copied to the resulting string. Otherwise, 0 is copied.|
|#||Similar to the 0 specifier. The difference is that if the value has no digit in the position where # is specified in the format string, nothing is copied to the resulting string.|
|.||Specifies the position of the decimal point. If the formatting string includes several decimal point specifiers, all of them are ignored except for the first one. The character that is used as a decimal separator is specified by the
|,||Specifies that the resulting string will include thousand separators. The number and position of thousand separator specifiers in the formatting string has no effect on the resulting string. The character that is used as the thousand separator is specified by the
|E+, E-, e+ or e-||Specifies that the resulting string will represent the Value using the scientific format. The 0 specifiers that immediately follow E+, E-, e+ or e- specify the number of digits for the exponent. The maximum number of 0s in this group is 4. If you use E+ or e+, the exponent will always have the sign. If you use the E- or e- specifiers, the sign will be displayed only for negative exponents.|
|'abc' or "abc"||Characters enclosed in single or double quotes have no effect on the formatting. They are just copied to the resulting string.|
Specifies the floating-point value to be converted to a string.
The specified floating-point value converted to a string.
This method is obsolete. It is supported for backward compatibility only. To convert a floating-point value to a string in a specific format, use the
When converting, the Value is always rounded to as many digits after the decimal point as there are 0 or # specifiers after the decimal point in the formatting string. If the formatting string does not hold the decimal point specifier, the Value is rounded to the nearest whole number.