- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
subroutine a(i)
implicit none
integer i
write(*,*)i
return
end subroutine a
call a(abs(1))
is this call legal, it works sometimes, but occasionally it seems to miss the number.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks perfectly legal to me - except that you need an "end" statement. But when you say it occasionally seems to miss the number, can you say under what circumstances and how does it miss the number?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem has been occurring in a call that had some allocated arrays passed at the same time.
I think I found the problem, by slowly working up for just this example to a full set of arguments and making the arrays last.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was a weird error and one that took a couple of hours to work through and check everything.
It surprised me.
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