Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/C++    [ Add a report in this area ]  
Report #:  120361   Status: Open
W8111 Accessing deprecated entity '_fastcall Character::IsNumber(const UnicodeString,int)'
Project:  C++Builder Build #:  19.0.13856.4978
Version:    19.0 Submitted By:   Tom Major
Report Type:  Minor failure / Design problem Date Reported:  11/10/2013 4:59:20 AM
Severity:    Commonly encountered problem Last Updated: 12/11/2013 8:15:29 PM
Platform:    All versions Internal Tracking #:   45966
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: (2 Total Ratings)
3.00 out of 5
Total Votes: 17
Description
I am moving a C++ Builder project from XE3 to XE5 and get the above mentioned warning. In the help, it is said that one should use TCharHelper.IsNumber instead.

But there are only Delphi references for TCharHelper.IsNumber, e.g. System.Character.pas and Delphi header definitions.

In this thread, Remy Lebeau states:
"That is because TCharHelper is a record helper, and record helpers are a
Delphi-only feature."

https://forums.embarcadero.com/thread.jspa?messageID=613260#613260

So I need a solution for C++ Builder for IsNumber, IsDigit etc.

I am aware that currently this is only a warning, but I am afaid that these functions vanish in upcoming releases of C++ Builder if the are makred as deprecated.

Steps to Reproduce:
1. Just create an empty VCL project

2. use the include:
  #include <Character.hpp>

3. anywhere use this function:
IsNumber()

4. and you will get the above mentioned warning.

------
#include <Character.hpp>
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  UnicodeString Mnt;
  if (IsNumber(Mnt, 9)) // <<---- [bcc32 Warning] : W8111 Accessing deprecated entity '_fastcall Character::IsNumber(const UnicodeString,int)'
    ;
}
------
Workarounds
None
Attachment
None
Comments

Tomohiro Takahashi at 11/10/2013 10:14:13 PM -
Could you please attach sample project to reproduce/confirm your issue?

Tom Major at 12/11/2013 1:50:29 PM -
Sorry for the late answer. But I did not get a notification by email.

Reproducing is pretty simple. Just create an empty VCL projekt and use the include:
#include <Character.hpp>

and anywhere use this function:
IsNumber()

and you will get the above mentioned warning.

Thanks,

Tomohiro Takahashi at 12/11/2013 6:49:00 PM -
Please use Windows Native QC client to attach a .zip file to your existing report.
The standalone client(QualityCentral.exe) comes with C++Builder.
Thanks.

Mike Versteeg at 7/21/2014 8:21:10 AM -
This question only shows you are not interested helping us. You do not even need code to understand the problem here, just read the Help page. I too spent half an hour figuring out the Help, finally writing my own code to fix this.

Acknowledge the product was not ready for release, apologise for the oversight and fix it. It's so easy to take care of your clients.

Tomohiro Takahashi at 7/21/2014 6:25:49 PM -
This report is already 'Open'.
Thanks.

Ashleigh Quick at 6/3/2015 6:06:02 PM -
Still broken in XE8, I'm bumping up against this now. Not happy, this has been open for years.

Clayton Arends at 6/17/2016 2:56:14 PM -
The problem happens through 10 Seattle.  As of 10.1 Berlin none of the classes or functions in System.Character.hpp warns about deprecation.

I cannot determine how Embarcadero removed the deprecation tags because System.Character.pas is pretty much identical between Seattle and Berlin.  I wonder if they applied a post build pass that stripped ...

  _DEPRECATED_ATTRIBUTE1("Use TCharHelper")

... from every line in the .hpp.

Server Response from: ETNACODE01