- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the code below, I would have expected an error related to the type of F not being defined in the submodule function definition (starting at line 14), since I thought that only when MODULE PROCEDURE (instead of MODULE FUNCTION) was used the repetition of the procedure interface (found in the parent module) could be omitted.
This is with Intel Parallel Studio XE 17.
MODULE M IMPLICIT NONE INTERFACE MODULE FUNCTION F(I) IMPLICIT NONE INTEGER :: I,F END FUNCTION F END INTERFACE END MODULE M SUBMODULE (M) S IMPLICIT NONE CONTAINS MODULE FUNCTION F(I) IMPLICIT NONE INTEGER :: I F = I END FUNCTION F END SUBMODULE S PROGRAM P USE M IMPLICIT NONE WRITE(*,*) F(1) END PROGRAM P
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, we should report the missing declaration. It looks to me as if this will be fixed in 17.0 Update 1, based on my testing of internal builds.
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