Delphi comes with a very well integrated debugger, but sometimes it's more appropriate and easier to display something in the middle of your program rather than stepping through many lines of code.
uses Windows;
procedure x( sMsg : string );
begin
MessageBox(
0,
PChar( sMsg ),
'Notice',
MB_OK );
end;
procedure x( sMsg : string );
begin
MessageBox(
0,
PChar( sMsg ),
'Notice',
MB_OK );
end;
Listing #1 : Delphi code. Download msgbox (0.23 KB).
uses Dialogs;
procedure x( sMsg : string );
begin
MessageDlg(
sMsg,
mtInformation,
[mbOk],
0 );
end;
procedure x( sMsg : string );
begin
MessageDlg(
sMsg,
mtInformation,
[mbOk],
0 );
end;
Listing #2 : Delphi code. Download msgdlg (0.23 KB).