9

The next code:

function get_symbol (var s: String): String;
var c: Char;
    p: Int32;
begin
// ... some more code ...
   c := upcase (s [p]);
   if IsDigit (c) then

causes the following error message:

[dcc32 Warning] fmx_utilities_string.pas(188): W1000 Symbol 'IsDigit' is deprecated: 'Use TCharHelper'

I don't understand this message as System.Character is included, c is declared to be Char and TCharhelper is declared as a character helper of Char. What am I doing wrong?

Arnold
  • 4,578
  • 6
  • 52
  • 91

1 Answers1

11

You're not using TCharHelper; you're using the old System.Character IsDigit function instead. The way to use TCharHelper.IsDigit is:

if c.IsDigit then
  ...
Ken White
  • 123,280
  • 14
  • 225
  • 444