- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have been developing a fortran program for around 6 years now, and haven'texperienced anyproblems in moving between different programme modules and subroutines. Recently, however, I have found that variables have fallen out of scope after returning from a pass to a subroutine. It is a basic question, but what do I need to do to ensure the integrety of variables during passes between subroutine calls?
Many thanks,
Justin.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For example, a variable x (which is notreferenced by subroutine B) is equal to 5 before the call to subroutine B, and is equal to some random number, or identified as an undefined pointer array after the call to subroutine B. I will check mycode forinaccurate array referencing and variable definitions.
Many thanks,
Justin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brilliant - I've found one bug, and suspect that there is another. I will try the compiler options that you suggest and continue to track them down. You have reduced by stress levels considerably (I was starting to wonder whether I had misunderstood use of modules and subroutines at a fundamental level).
Best regards,
Justin.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page