- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From a past forum discussion concerning the use of the SAVE statement, I know that adding a SAVE statement within the module is certainly the safest bet. However, I'm not sure where exactly to use the statement. For example, I don't know which of the following usages of SAVE statement are correct:
MODULE A
IMPLICIT NONE
SAVE
INTEGER, PARAMETER:: B=0
END MODULE A
or
MODULE A
IMPLICIT NONE
INTEGER, PARAMETER:: B=0
SAVE
END MODULE A
Thanks for any info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't need to use SAVE in a module, but if you do, anywhere in the specification-part is fine. Note that as of F2008, the words about module data being defined as long as a USE was in scope has been removed - the reality is that module data is implicitly SAVE and the standard now reflects that.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SAVE does not belong in modules. Module data is persistent and global to those that USE it.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You don't need to use SAVE in a module, but if you do, anywhere in the specification-part is fine. Note that as of F2008, the words about module data being defined as long as a USE was in scope has been removed - the reality is that module data is implicitly SAVE and the standard now reflects that.
- 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
It doesn’t hurt and is still allowed by the standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks alot
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page