Procedure Pointer, Derived Type

浪子不回头ぞ 提交于 2019-11-30 20:43:49

Add the nopass attribute to the declaration of the procedure pointer component.

procedure(interface1), pointer, nopass :: p

Edit: In response to your comment, if you want to use the pass keyword, the interface would have to be changed as such:

ABSTRACT INTERFACE 
    integer function interface1(passed_object, a)
        import :: type1
        class(type1), intent(...) :: passed_object
        real,         intent(in)  :: a
    END function interface1
END INTERFACE
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!