Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-03

IsValidIdent() with dots

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Juha Manninen

Hi

Is there a function like IsValidIdent but accepting also dots (.), as in name "TForm1.Action1Execute"?

While fixing a bug:
http://bugs.freepascal.org/view.php?id=25954
I copied and modified IsValidIdent.
It was easy to do, sure, but I would prefer to reuse an existing function especialy because this looks like a common use case.

Codetools has a suitable IsDottedIdentifier() but I need it in IDEIntf code which must not depend on Codetools.

Juha

Michael Van Canneyt
to Juha Manninen
Juha Manninen wrote 13 lines
Hi Is there a function like IsValidIdent but accepting also dots (.), as in name "TForm1.Action1Execute"? While fixing a bug: http://bugs.freepascal.org/view.php?id=25954 I copied and modified IsValidIdent. It was easy to do, sure, but I would prefer to reuse an existing function especialy because this looks like a common use case. Codetools has a suitable IsDottedIdentifier() but I need it in IDEIntf code which must not depend on Codetools.

IsValidIdent in sysutils handles dots.

Michael.