Utilities.CurrencyString Property

Applies to TestComplete 15.47, last modified on January 20, 2023
This property is obsolete. See the Remarks section below.

Description

Use the Utilities.CurrencyString property to specify the character (or characters) used as the currency symbol(s) by routines that convert float and currency values to strings.

Declaration

Utilities.CurrencyString

Read-Write Property String

Applies To

The property is applied to the following object:

Property Value

The string that holds the character(s) used as the currency symbol(s).

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

Remarks

Utilities.CurrencyString is obsolete and is supported for backward compatibility only. To get or set a character used as a currency symbol, use the aqEnvironment.GetLocaleInfo and aqEnvironment.SetLocaleInfo functions with LOCALE_SCURRENCY as the second parameter.

JavaScript, JScript

var currency_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY);
Log.Message(currency_string);

Python

currency_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY)
Log.Message(currency_string)

VBScript

currency_string = aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY)
Log.Message currency_string

DelphiScript

currency_string := aqEnvironment.GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY);
Log.Message(currency_string);

C++Script, C#Script

var currency_string = aqEnvironment["GetLocaleInfo"](LOCALE_USER_DEFAULT, LOCALE_SCURRENCY);
Log["Message"](currency_string);

Or, if you want to convert currency values to strings using a locale format, use aqConvert.CurrencyToStr and aqConvert.CurrencyToFormatStr. These methods use locale-specific decimal separators.

See Also

CurrencyToFormatStr Method
CurrencyToStr Method
Format Method
FloatToStr Method

Highlight search results