Message pragmas serve to force the display of messages in the Message window during the compilation process.
Insertion position: separate or already existing line in the text editor of a POU.
Pragma |
Message type |
---|---|
|
“Text”: display of <textstring>. |
|
|
|
Unlike the attribute pragma |
|
|
In the CODESYS Message window you can jump with the help of the commands “Next Message” and “Previous Message” from a message of the category “Information”, “Warning” and “Error” to the source position of the message. This means you jump to the position where the pragma is added in the source code.
Example
VAR var : INT; {info 'TODO: should get another name'} bvar : BOOL; arrTest : ARRAY [0..10] OF INT; i:INT; END_VAR arrTest[i] := arrTest[i]+1; ivar:=ivar+1; {warning 'This is a warning'} {text 'Part xy has been compiled completely'}
Display in the Message window:

See also