RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.FloatToStr Function

Converts a floating point value to a string.

Pascal
function FloatToStr(Value: Extended): string; overload;
function FloatToStr(Value: Extended; const FormatSettings: TFormatSettings): string; overload;
C++
AnsiString FloatToStr(Extended Value);
AnsiString FloatToStr(Extended Value, const TFormatSettings FormatSettings);

SysUtils

FloatToStr converts the floating-point value given by Value to its string representation. The conversion uses general number format with 15 significant digits. 

For greater control over the formatting of the string, use the FloatToStrF function. 

The first form of FloatToStr is not thread-safe, because it uses localization information contained in global variables. The second form of FloatToStr, which is thread-safe, refers to localization information contained in the FormatSettings parameter. Before calling the thread-safe form of FloatToStr, you must populate FormatSettings with localization information. To populate FormatSettings with a set of default locale values, call GetLocaleFormatSettings

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!