The Preprocessor

The Preprocessor

NBC also includes a preprocessor that is modeled after the Standard C preprocessor. The C preprocessor processes a source code file before the compiler does. It handles such tasks as including code from other files, conditionally including or excluding blocks of code, stripping comments, defining simple and parameterized macros, and expanding macros wherever they are encountered in the source code.

The NBC preprocessor implements the following standard preprocessor directives: #include, #define, #ifdef, #ifndef, #endif, #if, #elif, #undef, ##, #line, #error, and #pragma. It also supports two non-standard directives: #download and #import. Its implementation is close to a standard C preprocessor's, so most preprocessor directives should work as C programmers expect in NBC. Any significant deviations are explained below.


Generated by  doxygen 1.6.2