Utilities.DecimalSeparator Property

Applies to TestComplete 15.42, last modified on September 08, 2022
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.DecimalSeparator property to specify the character that is used as a separator between integer and fractional parts of a float number.

Declaration

Utilities.DecimalSeparator

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string that holds the character used as a separator between integer and fractional parts of a float number.

By default, DecimalSeparator holds the value that is specified by Regional Settings in the Windows Control Panel. To restore this value, call the GetFormatSettings method.

Remarks

Utilities.DecimalSeparator is obsolete and supported only for backward compatibility. To get or set the decimal separator, use aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo with LOCALE_SDECIMAL in the second parameter.

JavaScript, JScript

var dec_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL);
Log.Message(dec_separator);

Python

dec_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL)
Log.Message(dec_separator)

VBScript

dec_separator = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL)
Log.Message dec_separator

DelphiScript

dec_separator := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL);
Log.Message(dec_separator);

C++Script, C#Script

var dec_separator = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_SDECIMAL);
Log["Message"](dec_separator);

Or, if you want to convert strings to numbers or numbers to strings using the locale format, use aqConvert.StrToFloat and aqConvert.FloatToStr. These methods use the locale-specific decimal separator.

See Also

Working With Numeric Values
CurrencyToFormatStr Method
CurrencyToStr Method
Format Method
FloatToStr Method

Highlight search results