- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The following code does not compile - compilation of module1
results in the error message:
The type of the actual argument differs from the type of the dummy argument.
CALL SUB2(A)
This can't be the case since both types are identical.
The error seems to be coming from the using defined structure POINTER_TYPE which is defined in each module separately.
If instead, the definitions are moved to an entirely separate module which is USEd by module1 and module2, the code compiles fine. Surely (a) defining identical us...
The following code does not compile - compilation of module1
results in the error message:
The type of the actual argument differs from the type of the dummy argument.
CALL SUB2(A)
This can't be the case since both types are identical.
The error seems to be coming from the using defined structure POINTER_TYPE which is defined in each module separately.
If instead, the definitions are moved to an entirely separate module which is USEd by module1 and module2, the code compiles fine. Surely (a) defining identical us...
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, you may think so, but the Fortran standard considers these distinct types. Your workaround is the correct solution.
pwlivermore wrote:
Surely (a) defining identical user types in each module and (b) replacing each definition by a USE statement to a separate "definitions module" should be the same?
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