https://wiki.freepascal.org/index.php?title=Messages&feed=atom&action=historyMessages - Revision history2024-03-28T09:19:24ZRevision history for this page on the wikiMediaWiki 1.35.6https://wiki.freepascal.org/index.php?title=Messages&diff=132677&oldid=prevTrev: English translation of German page2020-02-20T22:55:09Z<p>English translation of German page</p>
<p><b>New page</b></p><div>{{Messages}}<br />
<br />
Free Pascal allows the programmer to define normal messages, warning and error messages. These messages are displayed in the message window. <br />
<br />
These self-defined messages are intended to enable the programmer to better oversee and manage his code. <br />
<br />
The compiler treats these messages as if they were messages generated by the compiler. This means that if the compiler has been instructed not to issue warnings, then self-defined warnings will not be issued. <br />
<br />
In contrast, error messages are always displayed. The compiler stops when there are 50 error messages. If an error message occurs, no executable file is created. In the event of a fatal error, the compiler stops immediately. <br />
<br />
The syntax for '''messages''' looks like this:<br />
<br />
<syntaxhighlight lang=pascal> <br />
{$Message Message text}<br />
// or<br />
{$Info Message text} <br />
</syntaxhighlight><br />
<br />
The syntax for '''notes''' looks like this: <br />
<br />
<syntaxhighlight lang=pascal><br />
{$Note Message text} <br />
</syntaxhighlight><br />
<br />
The syntax for '''warnings''' looks like this:<br />
<br />
<syntaxhighlight lang=pascal> <br />
{$Warning Warning Message text} <br />
</syntaxhighlight><br />
<br />
The syntax for '''hints''' looks like this:<br />
<br />
<syntaxhighlight lang=pascal> <br />
{$Hint Warning Message text} <br />
</syntaxhighlight><br />
<br />
The syntax for '''error''' messages looks like this:<br />
<br />
<syntaxhighlight lang=pascal> <br />
{$Error Error Message text} <br />
</syntaxhighlight><br />
<br />
The syntax for '''fatal error''' messages looks like this: <br />
<br />
<syntaxhighlight lang=pascal><br />
{$Fatal Error Message text}<br />
// or<br />
{$Stop Error Message text} <br />
</syntaxhighlight><br />
<br />
Note: You cannot use '''}''' in a message because this is the terminating character of a message for the compiler.</div>Trev