[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Convert a float value to a string using a fixed format.
Source position: line 0
function FloatToStr( |
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);
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.
lazarus-ccr.sourceforge.net |