If the preprocessor encounters an error when processing the source code it can return the text of a message to be output.
This message is displayed in the same way as other Compiler messages according to the WARNING and ERRQ directives, and it is also highlighted in the source code.
To generate an error, a preprocessor must pass through the source line in error. The error message is passed with the following settings:
Value | Severity |
---|---|
buffer | The text of the message. If the message text starts with the string OFFSETnnn (case is important) and a space, the error at the position specified by nnn is flagged. nnn is a three byte numeric number. The string is not displayed as part of the message. |
1 | Unrecoverable error |
2 | Severe error |
3 | Error |
4 | Warning |
5 | Informational |
6 | Flag count |
The function resp-main=17 should only be used once one or more user source lines have been returned to the Checker by the preprocessor.
An older technique for handling error conditions is still available. This requires the preprocessor to handle the actual display of the error message and so is less well integrated. We do not recommend this technique.
If the preprocessor encounters an error when processing the source code, it can communicate this to the Compiler so that the error is treated as a syntax error. There are two ways to do this:
The value in resp-more specifies the column number in which the error was found. It is used when positioning the cursor on return to the Editor.
It is also possible to force the Compiler to increment its internal error counts in conjunction with one of the two operations described above. This is done by setting resp-main to the value 7 and specifying which error count is to be increased in resp-more. Possible values for resp-more are:
Increasing the unrecoverable error count causes the Compiler to abort immediately. The contents of buffer are ignored.
It is the responsibility of the preprocessor to output error messages to the user before forcing the Compiler to either abort or increment the error counts. This should not be confused with the message that can be inserted in the list file which is for informational purposes only.