1 #line的用法
- #line用于强制指定新的行号和编译文件名,并对源程序的代码重新编号。
- 用法:#line number filename (filename可省略)。
- #line编译指示字的本质是重定义
__LINE__ 和 __FILE__
(由此可以看出来是由预处理进行处理的)。
编程实验:#line的使用
#include <stdio.h>
// The code section is written by A.
// Begin
#line 1 "a.c"
// End
// The code section is written by B.
// Begin
#line 1 "b.c"
// End
// The code section is written by Delphi.
// Begin
#line 1 "delphi_tang.c"