-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"?

Darshan Mehta
  • 30,102
  • 11
  • 68
  • 102
rihsano
  • 5
  • 1
  • 1
  • 5

1 Answers1

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.

w5m
  • 2,286
  • 3
  • 34
  • 46
  • still say [Error] Unit1.pas(38): Undeclared identifier: 'Showmassage' , any solution ? – rihsano Jun 17 '13 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. – David Heffernan Jun 17 '13 at 13:53
  • Please re-read my answer carefully - you need to replace the first `a` with an `e`. – w5m Jun 17 '13 at 13:54
  • yeah my fault i'm sorry , now it work thanks ^_^ , good bless you – rihsano Jun 17 '13 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 '13 at 14:16