C 编程/预处理器参考
外观
< C 编程
存在以下预处理器语句
Statement Subsequent items on the control line Meaning ========= ==================================== ======= #if conditional-expression conditional #ifdef identifier true iff identifier is a macro #ifndef identifier true iff identifier is not a macro #elif conditional-expression continues a conditional #else continues a conditional #endif ends a conditional #include header-name includes a file #define identifier defines a macro #undef identifier removes a previously defined macro #line number filename changes the line number and file name #error token-list specifies an error #pragma token-list catchall
一些非标准编译器也指定#warning和#import.
上面的条件表达式可以包含定义运算符。
上面的#define 标识符后面可以跟可选的参数列表,然后是可选的替换标记列表。参数列表的左括号必须没有前导空格。