System.AnsiStringBase.ToDouble

From RAD Studio API Documentation
Jump to: navigation, search

C++

double       ToDouble() const;

Properties

Type Visibility Source Unit Parent
function public dstring.h System AnsiStringBase

Description

Converts the string to a floating-point value.

ToDouble converts the string to a floating-point value. The string must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional 'E' or 'e' followed by a signed integer. Leading and trailing blanks in the string are ignored. The DecimalSeparator global variable defines the character that must be used as a decimal point. Thousand separators and currency symbols are not allowed in the string. If the string does not contain a valid value, an EConvertError exception is thrown.