- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If a variable of the same name as a module variable is decalred in a contained routine, it overrides the latter.
Is there a compiler option which prevents this, so that the user is warned of the override?
Thanks,
TSH
Is there a compiler option which prevents this, so that the user is warned of the override?
Thanks,
TSH
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - that's a standard Fortran feature. I think if you use ONLY, though, the compiler will complain if you also declare the item locally.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had a problem other way round -- see this thread on comp.lang.fortran. I still think it's a language misfeature.
Jugoslav
Jugoslav

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