aqConvert.FloatToStr Method

Applies to TestComplete 15.46, last modified on January 09, 2023

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
IntToStr Method
CurrencyToStr Method
Format Method

Highlight search results