Sign in Join
FPDoc Onlineexperiment

TDoubleHelper.ToString function

Member of TDoubleHelperpublicIn unit sysutils

Convert a Double-sized floating point value to a string.

Declaration

pascal
class function ToString(const AValue: Double): string; overload
 ; static
class function ToString(const AValue: Double; 
 const AFormat: TFloatFormat; 
 const APrecision: Integer; 
 const ADigits: Integer): string; overload
 ; static
class function ToString(const AValue: Double; 
 const AFormat: TFloatFormat; 
 const APrecision: Integer; 
 const ADigits: Integer; 
 const AFormatSettings: TFormatSettings): string
 ; overload; static
class function ToString(const AValue: Double; 
 const AFormatSettings: TFormatSettings): string
 ; overload; static
function ToString(const AFormat: TFloatFormat; 
 const APrecision: Integer; const ADigits: Integer)
: string; overload
function ToString(const AFormat: TFloatFormat; 
 const APrecision: Integer; const ADigits: Integer; 
 const AFormatSettings: TFormatSettings): string
 ; overload
function ToString(const AFormatSettings: TFormatSettings): string
 ; overload
function ToString: string; overload

Description

ToString will convert AValue (or Self in the plain method version) to a string. Optionally FormatSettings can be specified, to be able to specify the decimal separator character to use.

Additionally, a precision APrecision and number of digits ADigits can be specified, in conjunction with a AFormat parameter to specify the form in which the floating-point value must be represented. (see TFloatFormat for an explanation of the various values). In this case, FloatToStrF is used to format the value. In the absence of these parameters, FloatToStr is called.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.