- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the best way to map a named common to a namelist defintion when they have the same names.
For example
common /StoredData/ a,b,x
and
namelist /Datain/ a,b,x
The intent is to share data amongst source via the named common, and just load/save via namelist. Now the legacy system had it own namelist cludge so there was no name collision. But now that I am switch to "standard namelist" I have colisions.
My thoughts are leaning to a F90 module using a user defined data type, but that involves a fair amount of data copying, and seems quite inefficient.
Any thoughts?
Regards
Carl
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand the question. What sort of name collision do you see here? There's nothing wrong with having the same variable names in a common and a namelist. Could you perhaps post a short example that demonstrates the problem you are seeing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well you are sending me back to the wood shed for further study.
I did not think it was permissable to have the same "variable" names in both a named common and a namelist structure in the same source module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well you are sending me back to the wood shed for further study.
I did not think it was permissable to have the same "variable" names in both a named common and a namelist structure in the same source module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yup I am official mistaken .... sorry for the bother
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To elaborate, COMMON and NAMELIST are two very different types of collections. COMMON establishes a storage association among a set of variables. NAMELIST establishes a group name for variables you can then use in I/O statements - there is very little restriction on what kind of variable can be in a NAMELIST - the main restrictions are that it can't be USE associated and can't be an assumed-size array.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page