Utilities.StrToFloat Method

Applies to TestComplete 15.10, last modified on December 01, 2021
This method is obsolete. See the Remarks section below.


The Utilities.StrToFloat method converts the string specified by the Str parameter to a floating-point value.



Str [in]    Required    String    
Result Double

Applies To

The method is applied to the following object:


The method has the following parameter:


Specifies the string to be converted to a floating-point value. A valid string must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional mantissa. The mantissa consists of 'E' or 'e' followed by an optional sign (+ or -) and a whole number. Leading and trailing blanks are ignored.

The DecimalSeparator property defines the character that is used as a decimal point. Thousand separators and currency symbols are not allowed in the string. If the source string is invalid, StrToFloat raises an exception.

Result Value

The floating-point value to which the specified string has been converted.


This method is obsolete. It is supported for backward compatibility only. To convert a string into a floating-point number, use the aqConvert.StrToFloat method.

See Also

StrToFloat Method
FloatToStr Method
Format Method
StrToInt Method
StrToCurrency Method

Highlight search results