- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have maybe a trivial question, but however I can not fount the function in the manual.
I'm using a lot of files, so I want to use an unique file unit-number, not used somewhere else at the same time. Is there a method to proof if a file-unit is arlready used ?
I'm using a lot of files, so I want to use an unique file unit-number, not used somewhere else at the same time. Is there a method to proof if a file-unit is arlready used ?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[cpp]
integer*4 function get_free_file_unit_number integer*4, parameter :: first_unit= 10 integer*4, parameter :: last_unit =9999 logical*4 test do get_free_file_unit_number=first_unit,last_unit inquire(get_free_file_unit_number,opened=test) if (.not.test) return enddo get_free_file_unit_number=-1 end function[/cpp]

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