[Lazarus] unit Dialogs and showmessage
Juha Manninen
juha.manninen at phnet.fi
Wed Mar 31 21:06:06 CEST 2010
> Source position: dialogs.pp line 510
>
> procedure ShowMessage(
> const aMsg: String
> );
>
> there is also an example program:
>
> Program LazMessage;
> Uses Dialogs;
> begin
> ShowMessage ('This is a message from Lazarus')
> end.
>
> This does not compile: project1.lpr(4,16) Error: Identifier not found
> "ShowMessage"
>
> Also i cannot find the definition of this procedure anywhere in the
> unit dialogs and also this file is called dialogs.pas and not
> dialogs.pp on my system. How would i tell the use clause that i would
> like to use dialogs.pp instead of dialogs.pas?
The source file suffix is not relevant here.
I think you try to call an LCL function from a command line program.
It doesn't have LCL listed as a required package.
You should use ShowMessage only in graphical GUI applications. In command line
program you can use writeln instead.
Regards,
Juha Manninen
More information about the Lazarus
mailing list