- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I encounter an issue when calling "inquire" statement on one file and reading another one. Here is an example :
program test implicit none character(100) :: fdata, fresult, dummy integer :: uin, uout logical :: i_opened fdata = "datatest.dat" fresult = "resultest.dat" open (newunit = uin, file = fdata, form='formatted', status = 'old') inquire(FILE=fresult, OPENED=I_OPENED, NUMBER = uout) read(uin,*) dummy endprogram test
When I run that program, there is the following error :
severe (40): recursive I/O operation, unit -129 file unknown
This problem can be solved by placing the "inquire" statement before opening the fdata file, but i don't understand why. Can anyone explain this to me ?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This was a bug with NEWUNIT and was fixed some time ago. It works in the current release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
Thank you for your answer. Do you know which update fixed this bug ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure (I am away from the office and don't have access to our issues database), but from a review of the Readmes, it looks as if it was 2013 SP1 Update 3.

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