- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When I try to compile the code below, I get an error that says that the specified interface is not declared. Is this a bug or am I doing something wrong?
Thanks!
module mod1
abstract interfacesubroutine sub1(data1)
integer, intent(INOUT) :: data1
end subroutine
end interface
contains
subroutine sub2(data1, proc)
integer, intent(INOUT) :: data1
procedure(sub1), optional :: proc
if (PRESENT(proc)) call proc(data1)
end subroutine
end module mod1
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler bug. It's already fixed for a future release.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page