Solved

Deprecated Global Variables Removed; Use FormatSettings Instead

Posted on 2013-01-30
6
645 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

758 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