Fortran Coder

查看: 14031|回复: 3
打印 上一主题 下一主题

[指针] 祖传代码错误

[复制链接]

35

帖子

17

主题

0

精华

熟手

F 币
136 元
贡献
240 点
跳转到指定楼层
楼主
发表于 2016-11-2 13:31:26 | 显示全部楼层 回帖奖励 |倒序浏览 |阅读模式
cvf祖传代码现需要ivf编译
代码示意:
[Fortran] 纯文本查看 复制代码
subroutine sub
use link
implicit none
integer :: add
integer :: a,b
potinter(add,fileonpen)
call fileonpen(a,b)
end subroutine sub

module link
interface
   subroutine fileopen(a,n)
   intger :: a,b
   end subroutine fileopen
end interface
endmodule link

问题: error#6401: the attributes of this name conflict with those made accessible by a use statement.【fileopen】
在sub中fileopen未定义,ivf编译后错误与link中子例程fileopen命名冲突,cvf编译无误。
求解,祖传代码太大,是否ivf存在某个选项可以关闭这个错误识别,或者如何修改?

分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

35

帖子

17

主题

0

精华

熟手

F 币
136 元
贡献
240 点
沙发
 楼主| 发表于 2016-11-4 11:38:48 | 显示全部楼层
楚香饭 发表于 2016-11-2 16:50
除了两个单词拼写错误之外,我这里没有发现这个问题,用的也是ivf

[mw_shl_code=fortran,true]module link ...

确实我也试了下,没有任何问题。
我把module link生成mod文件添加到主程序内,ivf编译也没有任何问题。

但是很奇怪祖传代码还是报错,暂时不能理解。

我想询问下pointer(add,fileopen)是实现了什么样的功能,将一个intger和子例程名fileoepn绑定了地址?
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-5-6 13:15

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表