Icon DoubleToStr

Unit: Internal

Available In: Client and Server Applications

function DoubleToStr(Value: Double; Decimals: Integer=-1): String

The DoubleToStr function returns a formatted string for the Double input parameter. The decimal separator used in the formatted string is always a period (.). The return value is a String value. You can use the optional Decimals parameter to specify that the return value is formatted to a specific number of decimal places.

Examples

A := StrToDouble('1200.548');
X := DoubleToStr(A);  // X is '1200.548'

A := StrToDouble('1200.548');
X := DoubleToStr(A, 1);  // X is '1200.5'
Image