mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 12:09:30 +02:00
23 lines
390 B
ObjectPascal
23 lines
390 B
ObjectPascal
Program Example75;
|
|
|
|
{ This program demonstrates the IsValidIdent function }
|
|
|
|
Uses sysutils;
|
|
|
|
Procedure Testit (S : String);
|
|
|
|
begin
|
|
Write ('"',S,'" is ');
|
|
If not IsVAlidIdent(S) then
|
|
Write('NOT ');
|
|
Writeln ('a valid identifier');
|
|
end;
|
|
|
|
Begin
|
|
Testit ('_MyObj');
|
|
Testit ('My__Obj1');
|
|
Testit ('My_1_Obj');
|
|
Testit ('1MyObject');
|
|
Testit ('My@Object');
|
|
Testit ('M123');
|
|
End. |