67-三字符序列
B.7.1 三字符序列
有些键盘没有C中使用的所有符号,因此C提供了一些由三个字符组成的序列(即三字符序列)作为这些符号的替换表示。如表B.7.1所示。
| 三字符序列 | 符号 | 三字符序列 | 符号 | 三字符序列 | 符号 |
| :----- | :----- | :----- | :----- | :----- | :----- | :----- | :----- |
| ??= | # | ??( | [ | ??/ | \ |
| ??) | ] | ??' | ^ | ??< | { |
| ??! | | | ??> | } | ??- | ~ |
C替换了源代码文件中的这些三字符序列,即使它们在双引号中也是如此。因此,下面的代码:
??=include <stdio.h>
??=define LIM 100
int main()
??<
int q??(LIM??);
printf("More to come.??/n");
...
??>
会变成这样:
#include <stdio.h>
#define LIM 100
int main()
{
int q[LIM];
printf("More to come.\n");
...
}
当然,要在编译器中设置相关选项才能激活这个特性。