-2
procedure TForm1.Button2Click(Sender: TObject);
begin
showmassage('Create by rihsano');
end;

Delphi reports the following error:

 [Error] Unit1.pas(38): Undeclared identifier: 'showmassage'

One more question: what is "undeclared identifier"?

2
  • 2
    "Undeclared identifier" is an identifier that has not been declared. Jun 17, 2013 at 13:53
  • @Safa You should not edit error messages in questions, it would hide the real problem (as it definitely does with your edit). Mar 7, 2016 at 12:34

1 Answer 1

8

Replace showmassage with ShowMessage (case isn't important, but spelling is!).

"Undeclared identifier" means that Delphi cannot find the declaration that tells it what showmassage is, so it highlights it as an item that hasn't been declared.

5
  • still say [Error] Unit1.pas(38): Undeclared identifier: 'Showmassage' , any solution ?
    – rihsano
    Jun 17, 2013 at 13:53
  • 9
    The solution is that you carefully read the answer again and do what it says. You are trying to to display a message box. You are not trying to get a leg rub. Jun 17, 2013 at 13:53
  • Please re-read my answer carefully - you need to replace the first a with an e.
    – w5m
    Jun 17, 2013 at 13:54
  • yeah my fault i'm sorry , now it work thanks ^_^ , good bless you
    – rihsano
    Jun 17, 2013 at 14:03
  • And for the next time, in the case that Keith mentioned: if you click on the word, hit Ctrl-F1, you get online help telling you (among other things) what unit the procedure/type is identified in - that's the unit to add to your Uses clause. Try it now with ShowMessage.
    – Jan Doggen
    Jun 17, 2013 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.