mirror of
https://github.com/wangdoc/clang-tutorial.git
synced 2026-02-10 06:05:39 +08:00
docs(preprocessor): fixed #29
This commit is contained in:
@@ -306,7 +306,7 @@ $ gcc -Iinclude/ -o code code.c
|
||||
|
||||
`#if`后面的判断条件,通常是一个表达式。如果表达式的值不等于`0`,就表示判断条件为真,编译内部的语句;如果表达式的值等于0,表示判断条件为伪,则忽略内部的语句。
|
||||
|
||||
`#if...#end`之间还可以加入`#else`指令,用于指定判断条件不成立时,需要编译的语句。
|
||||
`#if...#endif`之间还可以加入`#else`指令,用于指定判断条件不成立时,需要编译的语句。
|
||||
|
||||
```c
|
||||
#define FOO 1
|
||||
|
||||
Reference in New Issue
Block a user