Show: Delphi C++
Display Preferences

Global Variables

From RAD Studio
Jump to: navigation, search

Go Up to Using the RTL (Run-Time Library)


Deprecated Global Variables Removed; Use FormatSettings Instead

Twenty global variables that previously resided in System.SysUtils, and which have been deprecated for several years, have now been removed from the product. These global variables typically pertain to date, time, and currency format (CurrencyString, LongTimeFormat, ShortMonthNames, and so on).

The declarations for these removed global variables previously contained comments about their deprecation, as follows:

NegCurrFormat2.png


Instances of these global variables in your code now result in a compiler error, as follows:

There are two workarounds:

  • Use the corresponding fields of the System.SysUtils.FormatSettings global variable. For example, if your code used System.SysUtils.NegCurrFormat, you can substitute:
FormatSettings.NegCurrFormat
  • Create your own TFormatSettings structure and call the overloaded functions that take the structure.


The deprecated global variables include the following:

Global Variable
(System.SysUtils)
Corresponding
TFormatSettings Field  

CurrencyDecimals

CurrencyDecimals

CurrencyFormat

CurrencyFormat

CurrencyString

CurrencyString

DateSeparator

DateSeparator

DecimalSeparator

DecimalSeparator

ListSeparator

ListSeparator

LongDateFormat

LongDateFormat

LongDayNames

LongDayNames

LongDayNames

LongDayNames

LongTimeFormat

LongTimeFormat

NegCurrFormat

NegCurrFormat

ShortDateFormat

ShortDateFormat

ShortDayNames

ShortDayNames

ShortMonthNames

ShortMonthNames

ShortTimeFormat

ShortTimeFormat

ThousandSeparator

ThousandSeparator

TimeAMString

TimeAMString

TimePMString

TimePMString

TimeSeparator

TimeSeparator

TwoDigitYearCenturyWindow

TwoDigitYearCenturyWindow

Personal tools
In other languages