$UERROR | $UE - Generate a compiler error

Language reference ›› Directives ››
Parent Previous Next

user-error-directive = ( $UERROR | $UE ) [ condition "," ] message .


Raise an error message.


<condition>:

An optional boolean expression that conditions the action: if true the error is treated.


<message>:

A string expression that gives a literal string.


The error will count in the total compiler error count so that the linker will not be called.



{$IFDEF HIGHPERF}
 {$UERROR ’Sorry this module cannot be used with a PIC18 processor’}
{$ENDIF}

{$UERROR DEFINED(’PIC18*’), ’Sorry this module cannot be used with a PIC18 processor’}