| [Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | 
Convert a float value to a string using a fixed format.
Source position: sysstrh.inc line 181
function FloatToStr(  | 
Value: Extended  | 
):string;  | 
Value: Extended;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
Value: Double  | 
):string;  | 
Value: Double;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
Value: Single  | 
):string;  | 
Value: Single;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
Value: Currency  | 
):string;  | 
Value: Currency;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
Value: Comp  | 
):string;  | 
Value: Comp;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
Value: Int64  | 
):string;  | 
Value: Int64;  | 
const FormatSettings: TFormatSettings  | 
):string;  | 
FloatToStr converts the floating point variable Value to a string representation. It will choose the shortest possible notation of the two following formats:
More information on these formats can be found in FloatToStrF. FloatToStr is completely equivalent to the following call:
FloatToStrF(Value, ffGeneral,15, 0);
Note that on unix systems, the localization support must be enabled explicitly, see Localization.
None.
  | 
Convert a float value to a string using a given format.  | 
|
  | 
Format a float according to a certain mask.  | 
|
  | 
Convert a string to a floating-point value.  | 
Program Example67; { This program demonstrates the FloatToStr function } Uses sysutils; Procedure Testit (Value : Extended); begin Writeln (Value,' -> ',FloatToStr(Value)); Writeln (-Value,' -> ',FloatToStr(-Value)); end; Begin Testit (0.0); Testit (1.1); Testit (1.1e-3); Testit (1.1e-20); Testit (1.1e-200); Testit (1.1e+3); Testit (1.1e+20); Testit (1.1e+200); End.