This page lists and briefly describes preprocessor directives available. To get more information on any item listed here, go to the reference page for that item.
| Preprocessor Directives | |
|---|---|
| Name | Action |
| # | Null directive specifying that no action be performed. |
| #define | Defines a preprocessor macro. |
| #elif | Conditionally includes source text if the previous #if, #ifdef, #ifndef, or #elif test fails. |
| #else | Conditionally includes source text if the previous #if, #ifdef, #ifndef, or #elif test fails. |
| #endif | Ends conditional text. |
| #error | Defines text for a compile-time error message. |
| #if | Conditionally includes or suppresses portions of source code, depending on the result of a constant expression. |
| #ifdef | Conditionally includes source text if a macro name is defined. |
| #ifndef | Conditionally includes source text if a macro name is not defined. |
| #include | Inserts text from another source file. |
| #line | Supplies a line number for compiler messages. |
| #pragma | Specifies implementation-defined instructions to the compiler. |
| #undef | Removes a preprocessor macro definition. |
![]()
Preprocessor
Directives
Preprocessing
Operations
Preprocessor
Macros
Conditional
Compilation Directives