| |||||||||||||||||||||||||||||||
Technical Support On-Line Manuals C251 User's Guide | Preprocessor DirectivesPreprocessor directives must be the first non-whitespace text specified on a line. All directives are prefixed with the pound or number-sign character ('#'). For example: #pragma PRINT #include <stdio.h> #define DEBUG 1 Whitespace is allowed before and after the number-sign ('#'). A number-sign ('#') that appears alone on a line is interpreted as a null preprocessor directive. For example: # define myfavnum 45 # # include <stdio.h> The entire proprocessor directive must be contained in a single source line. Line continuations, backslash ('\') followed by a new-line character, may be used in preprocessor directives since these are removed by the preprocessor. For example:
#define mycode \
{ \
volatile unsigned char i; \
for (i=0; i<100; i++); \
}
The number-sign ('#') and the preprocessor directive must be explicitly specified and may not come from a macro expansion. For example: #define mydef #define otherdef 16 mydef In this case, mydef is expanded to define otherdef 16 since # is interpreted as a stringize operator. This expansion is processed by the compiler and a syntax error is generated. The following table lists the preprocessor directives and gives a brief description of each.
| ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||