- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
What do you think thac causes this following error:
error #6634: The shape matching rules of actual arguments and dummy arguments have been violated.
Thank you all!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ketson -
In Fortran 77 it was not unusual to pass arrays to subroutines using mismatched number of dimensions. For example, you might pass a two-dimensional array to a routine that accepts a one-dimensional array. And, by virtue of argument association, this would work, even if it's not the cleanest way to code your program.
I'm guessing that you have /warn:interfaces enabled, which will check for this disconnect.
--Lorri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Lorri,
Moreover, I have /warn:interfaces enabled!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is indeed the case, the correct way to do this is to pass the first element of the array, for example A(1,1) - this is "sequence association" and will suppress the error check.
I will comment that it is more helpful if you post the code in question rather than just the error message. If it's a call, include the declarations of the arguments in the call and the declaration of the called routine and its arguments.

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