Solved

Deprecated Global Variables Removed; Use FormatSettings Instead

Posted on 2013-01-30
6
650 Views
Last Modified: 2013-04-11
Upgraded to Delphi XE3, now I get an E2003 undeclared indentifier error.
The DecimalSeparator and others has been deprecated in XE3 and now I must use FormatSettings Instead to work around this deprecation. but I don't know how to do this.
Could an expert show me an code example how to work around this error
Thanks Frits2
0
Comment
Question by:Frits2
  • 3
  • 3
6 Comments
 
LVL 37

Accepted Solution

by:
TommySzalapski earned 250 total points
ID: 38835279
Just use System.SysUtils.FormatSettings.DecimalSeparator or just FormatSettings.DecimalSeparator if you are using the SysUtils namespace already. It should work the same way.
References:
http://docwiki.embarcadero.com/RADStudio/XE3/en/Global_Variables
0
 

Author Comment

by:Frits2
ID: 38839527
Thanks for your answer Tommy.
I did get to the http://docwiki.embarcadero.com/RADStudio/XE3/en/Global_Variables already,
but still don't know what to do with it.
do I have to change the code of my program, or do I have to change the SysUtils.pas to make the decimalseparator work again.
thanks Frits2
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 38839783
Yes. You will need to change your program. The variable you used has been removed (no longer exists). So you need to use the new one instead.

The only way to avoid changing your code would be to hack in some sort of macro or revert back to using the old version of XE3.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Frits2
ID: 38843026
The variable I use is the decimalseparator and is in the Spin.pas at line 486 (TSpinEdit) coming with Delphi XE3. the Spin.pas uses the SysUtils and there comes the DecimalSeparator  in the type  TFormatSettings = record at line 862 DecimalSeparator: Char;

There must be a workaround this Deprecated variable and that is what I am looking for not for changing my programs. the error E2003 is Not generated in my programs but in Spin.pas and SysUtils.

hope somebody can send me the wordkaround
thanks
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 38844938
Can you upgrade Spin.pas and SysUtils?
0
 

Author Comment

by:Frits2
ID: 38846325
Hi Tommy
Spin.pas and SysUtils are the origimal files from Delphi XE3
I do have contact with Embarcadero about this and first they told me the E2003 erros is caused in my code but I don't use the decimalseparator at all So I guess this is a bug in the Delphi XE3 when I get a solution or upgrade files from Embarcadero I let you know.
Thanks for all your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
This video teaches viewers about errors in exception handling.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now