Utilities.StrToFloat Method

Applies to TestComplete 14.40, last modified on April 22, 2021
This method is obsolete. See the Remarks section below.

Description

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

Declaration

Utilities.StrToFloat(Str)

Str [in]    Required    String    
Result Double

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

Str

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.

Remarks

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