Preprocessor Directives; Preprocessor - mikroElektronika PIC Microcontrollers PIC12 User Manual

Mikroc user's manual
Table of Contents

Advertisement

mikroC
making it simple...

PREPROCESSOR

Preprocessor is an integrated text processor which prepares the source code for
compiling. Preprocessor allows:
- inserting text from a specifed file to a certain point in code,
- replacing specific lexical symbols with other symbols,
- conditional compiling which conditionally includes or omits parts of code.
Note that preprocessor analyzes text at token level, not at individual character
level. Preprocessor is controled by means of preprocessor directives and pre-
processor operators.

Preprocessor Directives

Any line in source code with a leading
control line), unless the
embedded in a comment. The initial
(excluding new lines).
The null directive consists of a line containing the single character
always ignored.
Preprocessor directives are usually placed at the beginning of the source code, but
they can legally appear at any point in a program. The mikroC preprocessor
detects preprocessor directives and parses the tokens embedded in them. Directive
is in effect from its declaration to the end of the program file.
mikroC supports standard preprocessor directives:
# (null directive)
#define
#elif
#else
#endif
#error
Note:
MikroElektronika: Development tools - Books - Compilers
is within a string literal, in a character constant, or
#
directive is under construction.
#pragma
mikroC - C Compiler for Microchip PIC microcontrollers
is taken as a preprocessing directive (or
#
can be preceded or followed by whitespace
#
#if
#ifndef
#ifndef
#include
#line
#undef
. This line is
#
page
125

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PIC Microcontrollers PIC12 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Pic microcontrollers pic16Pic microcontrollers pic18

Table of Contents