对预处理器的指令Directives to the Preprocessor

“指令”指示 C 预处理器在编译之前先对程序的文本执行特定操作。A "directive" instructs the C preprocessor to perform a specific action on the text of the program before compilation. 《预处理器参考》中完整描述了预处理器指令Preprocessor directives are fully described in the Preprocessor Reference. 本示例使用预处理器指令 #defineThis example uses the preprocessor directive #define:

#define MAX 100  

该语句告知编译器在编译前将 MAX 的每个匹配项替换为 100This statement tells the compiler to replace each occurrence of MAX by 100 before compilation. C 编译器预处理器指令为:The C compiler preprocessor directives are:

#define#define #endif#endif #ifdef#ifdef #line#line
#elif #error #ifndef#ifndef #pragma#pragma
#else #if #include #undef

另请参阅See Also

源文件和源程序Source Files and Source Programs