Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Deprecated Global Variables Removed; Use FormatSettings Instead

Posted on 2013-01-30
6
Medium Priority
?
700 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 1000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
This article will show, step by step, how to integrate R code into a R Sweave document
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

670 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