Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

C Compiler Reference Manual

__DEVICE__
Syntax:

__device __

Elements:

None

Purpose:

This pre-processor identifier is defined by the compiler with


the base number of the current device (from a #device).
The base number is usually the number after the C in the
part number. For example the PIC16C622 has a base
number of 622.

Examples:

#if __device__==71
SETUP_ADC_PORTS( ALL_DIGITAL );
#endif

Example Files:

None

Also See:

#device

#ERROR
Syntax:

#error text

Elements:

text is optional and may be any text

Purpose:

Forces the compiler to generate an error at the location this


directive appears in the file. The text may include macros
that will be expanded for the display. This may be used to
see the macro expansion. The command may also be used
to alert the user to an invalid compile time situation.

Examples:

#if BUFFER_SIZE>16
#error Buffer size is too large
#endif
#error
Macro test: min(x,y)

Example Files:

ex_psp.c

Also See:

None

40

You might also like