System-defined symbols

Language reference ›› Directives ›› Conditional compilation ››
Parent Previous Next

Some conditional symbols are automatically defined by the compiler and cannot be changed:

Identifying the selected device:

The name of the device Part Number defined in the project's options or by a $PROCESSOR directive is defined as a conditional compilation symbol, so that some conditional compilation constructs may use it.

Identifying the selected device class:

A symbol identifying the device class is automatically defined: BASELINE or MIDRANGE or HIGHPERF or ENHANCED.

{-$PROCESSOR PIC18F14K22} // alternate option

{$IFDEF 'PIC16F6*'} /// Specific to this family
{$ELSIF DEFINED(MIDRANGE)} // Else, for all other mid-range devices...
{$ELSIF DEFINED(HIGHPERF)} // Else, for all high performance devices...