1. Home
  2. Computing & Technology
  3. Delphi Programming
Glossary|Tips/Tricks|FREE App/VCL|Best'O'Net|Books|Link Back

Delphi Programming RTL Reference|By Category|Alphabetically|By Unit
 

FloatToStr

unit
SysUtils
category
Floating point conversion routines

declaration
function FloatToStr(Value: Extended): string; overload;
function FloatToStr(Value: Extended; const FormatSettings: TFormatSettings): string; overload;

description
Returns a string from a floating point value.

FloatToStr converts the given floating-point value to its string representation. The conversion uses general number format with 15 significant digits.
The second form of FloatToStr, refers to localization information contained in the FormatSettings parameter.

example
var s: string;

s := FloatToStr(PI); //uses Math !!
//s == '3.14159265358979'


in real code

see also
TFormatSettings, FloatToStrF, FormatFloat, StrToFloat,


 Free Delphi code snippet inside every Delphi Newsletter!
Subscribe to the Newsletter
Name
Email

 Got some code to share? Got a question? Need some help?
Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.