http://www.tutorialspoint.com/ansi_c/c_preprocessors.htm
这是ANSI C的宏操纵:
1. stringizing operator:使用单个#,相当于对变量加了"",例如#define PRINT_STR(x) printf("%s", #x)。则PRINT_STR(abc)展开之后就是printf("%s", "abc")
2. Token-pasting operator:使用##,相当于如下
#define paster( n ) printf( "token"#n" = %d\n", token##n )
int token9 = 100;
再调用 paster(9);宏展开后token##n直接合并变成了token9。整个语句变成了
printf( "token""9"" = %d", token9 );
在C语言中字符串中的二个相连的双引号会被自动忽略,于是上句等同于
printf("token9 = %d", token9);。
即输出token9 = 100
3. 可变宏展开
#define UNAME(a) a##__LINE__
UNAME(lidy) ==> lidy__LINE__
4. 两端都有字符创的时候需要
ttp_route_##table##_inc(void)