- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a problem with passing of allocatable arrays trough subroutines ona Intel Fortran Compiler 10. In my code i'm using a modules instead subroutines as solution for allocatable arrays. The problem occurs when i tried to move a slice of allocatable array into another module.My code isoriginaly from the CVF 6.6C(Compaq Visual Fortran 6.6C), where it works fine. But when i compile the same codewith theIntel Fortran Compiler 10 i get the message ''Error1 Error: If dummy arg is allocatable, actual arg must be a whole array and not a section''.Is anyone knows how can i resolve this problem, without changing the code.
Thanks in advance
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Without changing the code? No. Your code has an error and has to be fixed. The fix is to remove the ALLOCATABLE attribute on the dummy arguments in the called routines. There is no requirement to have that attribute passed along unless you plan to change the allocation status in the subroutine, in which case you obviously cannot pass a slice.

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