- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using a namelist input for a selected set of inputs. It seems like (this is CVF) if I don't terminate the block (incomplete data) with a "/" then the value of the IOSTAT returned is -1.
Is there somewhere in the documentation that talks about that?
Linda
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you don't terminate the namelist input, it has to keep reading to see if there's more. If it runs past the end of file, that gets you the -1 IOSTAT. There's nothing in the language definition to say that an EOF implicitly ends namelist input any more than it does any other kind.
As for documentation, yes, it is there, but in the generic way, not specific to namelist.
As for documentation, yes, it is there, but in the generic way, not specific to namelist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve.
It's clear in at least one of my F90/95 references that good practice is to end it with a "/".
Linda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: "good practice"
I am reminded of the bit of humor that goes "186,000 miles per second - it's not just a good idea, it's the law!" The ending slash (or $END if you're using the old extension style) is not optional - it is required and is an error to omit it.
I am reminded of the bit of humor that goes "186,000 miles per second - it's not just a good idea, it's the law!" The ending slash (or $END if you're using the old extension style) is not optional - it is required and is an error to omit it.

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