aqConvert.FloatToStr Method

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

The FloatToStr method converts a floating-point value to a string. The resultant string holds up to 15 digits. Trailing zeros are removed and the decimal point appears only if it is necessary. The resulting value is formatted according to the current local settings. To apply custom formatting, use the aqString.Format method.

Declaration

aqConvert.FloatToStr(F)

F [in]    Required    Double    
Result String

Applies To

The method is applied to the following object:

Parameters

The method has the following parameter:

F

Specifies the floating-point value to be converted to a string.

Result Value

The string containing the converted floating-point value.

Example

The code below demonstrates how to use the FloatToStr method:

JavaScript, JScript

Log.Message(aqConvert.FloatToStr(154.26));

Python

Log.Message(aqConvert.FloatToStr(154.26))

VBScript

Call Log.Message(aqConvert.FloatToStr(154.26))

DelphiScript

Log.Message(aqConvert.FloatToStr(154.26));

C++Script, C#Script

Log["Message"](aqConvert["FloatToStr"](154.26));

See Also

Working With Numeric Values
aqConvert.IntToStr Method
aqConvert.CurrencyToStr Method
aqString.Format Method

Highlight search results