Other Directives
Programmers may have to prepare C programs or C library packages that have to work in a variety of environments. The choices of types of code can vary from one environment to another. The preprocessor provides several directives that help the programmer produce code that can be moved from one system to another by changing the values of some #define macros. The #undef directive cancels an earlier #define definition. The #if, #ifdef, #ifndef, #else, #elif, and #endif directives allow you to specify different alternatives for which code is compiled. The #line directive lets you reset line and file information, the #error directive lets you issue error messages, and the #pragma directive lets you give instructions to the compiler. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access