免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2150 | 回复: 3
打印 上一主题 下一主题

ec源程序中__FILE__和__LINE__的显示 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-25 11:26 |只看该作者 |倒序浏览
我在se版本的informix写的.ec程序,我想用__FILE__,__LINE__ 把当前运行到的文件和当前行打印出来.结果打印出的文件名字前面总带ESQL四个字母.比如原来的文件名字是abc.ec,显示出来的是ESQLabc.ec.而且行数也不对,大了很多.什么原因

论坛徽章:
0
2 [报告]
发表于 2006-08-25 11:53 |只看该作者
测了下 没问题。
编译器esql的问题。

论坛徽章:
0
3 [报告]
发表于 2006-08-25 21:16 |只看该作者

回复 2楼 wenlq 的帖子

The ESQL/C acutally is a pre-compiler. When we compile an ESQL/C program, ESQL/C will replace the SQL in .ec into related c function call, a interim .c file will be created, then pass the .c file to OS compiler CC, and CC will continue compile the .c file created by EQL/C compiler and link all related Informix lib to create the final executable. So, the macro "__LINE__" and "__FILE__" will be the file and line# of .c file, sometime it maybe not accurate mapping to .ec file line#.   If you compile .ec program and keep the interim .c file, you will find the detail.

论坛徽章:
0
4 [报告]
发表于 2006-09-01 19:00 |只看该作者
那你看看你的*.c 中的代码。。。 能找到问体的。。。 ec 先编译成.c 文件 在调用cc编译器。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP