过程指针,派生类型
以下内容无法在 Intel Fortran XE 2011 中编译:
TYPE type1
procedure(interface1),POINTER::p
END TYPE type1
ABSTRACT INTERFACE
integer function interface1(a)
real,intent(in)::a
END function interface1
END INTERFACE
错误:
error #8262: The passed-object dummy argument must be dummy data object with the same declared type as the type being defined.
The following doesnt compile in Intel Fortran XE 2011:
TYPE type1
procedure(interface1),POINTER::p
END TYPE type1
ABSTRACT INTERFACE
integer function interface1(a)
real,intent(in)::a
END function interface1
END INTERFACE
The error:
error #8262: The passed-object dummy argument must be dummy data object with the same declared type as the type being defined.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将
nopass
属性添加到过程指针组件的声明中。编辑:为了回应您的评论,如果您想使用 pass 关键字,则必须将界面更改为:
Add the
nopass
attribute to the declaration of the procedure pointer component.Edit: In response to your comment, if you want to use the pass keyword, the interface would have to be changed as such: