Datasheet
PREPROCESSOR DIRECTIVES
Any line in the source code with a leading # is taken as a preprocessing directive (or
control line), unless # is within a string literal, in a character constant, or embedded
in a comment. The initial # can be preceded or followed by a whitespace (excluding
new lines).
A null directive consists of a line containing the single character #. This line is 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 PRO for AVR pre-
processor detects preprocessor directives and parses the tokens embedded in
them. A directive is in effect from its declaration to the end of the program file.
Here is one commonly used directive:
#include <math.h>
For more information on including files with the #include directive, refer to File
Inclusion.
The mikroC PRO for AVR supports standard preprocessor directives:
# (null directive) #if
#define #ifdef
#elif #ifndef
#else #include
#endif #line
#error #undef
Note: For the time being only funcall pragma is supported.
Line Continuation with Backslash (\)
To break directive into multiple lines end the line with a backslash (\):
#define MACRO This directive continues to \
the following line.
219
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5