UU
- From: robert.corbett@xxxxxxx
- Date: 28 Oct 2006 00:34:02 -0700
Mike wrote:
Hi
I would like to know whether a file with io-unit has been opened.
To prevent from the following situation:
program main
open(11,file='a.dat',....
call suba()
close(11)
end
subroutine suba()
open(11,file='a.dat',....
......
close(11)
end subroutine suba
Can I detect if io-unit in suba has been used in somewhere else, like
main?
There is no 100% reliable method, but the INQUIRE statement
INQUIRE(11, OPENED=opened)
where opened is a logical variable comes close.
Bob Corbett
.
- References:
- io-unit has been opened
- From: Mike
- io-unit has been opened
- Prev by Date: io-unit has been opened
- Next by Date: Re: Keywords: UPCASE, downcase or Capitalized?
- Previous by thread: io-unit has been opened
- Next by thread: Re: io-unit has been opened
- Index(es):
Relevant Pages
|
|