Solved

Deprecated Global Variables Removed; Use FormatSettings Instead

Posted on 2013-01-30
6
688 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

626 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