Home > Archive > Fortran > March 2006 > Re: Automatic allocation of an available file unit
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Automatic allocation of an available file unit
|
|
| beliavsky@aol.com 2006-03-31, 7:01 pm |
| Paul Van Delst wrote:
<snip>
> But, if you do the above doesn't it mean that you don't really care what the actual unit
> value is? All you care is that it's valid to use for file I/O, right? So what does it
> matter if it's negative?
The NUMBER specifier for the INQUIRE statement returns the unit number
connected to the file, or -1 if there is no unit connected to the file.
Therefore I would never want -1 to be a valid unit number.
| |
| Paul Van Delst 2006-03-31, 7:01 pm |
| beliavsky@aol.com wrote:
> Paul Van Delst wrote:
>
> <snip>
>
>
>
> The NUMBER specifier for the INQUIRE statement returns the unit number
> connected to the file, or -1 if there is no unit connected to the file.
> Therefore I would never want -1 to be a valid unit number.
From the original link, http://j3-fortran.org/doc/year/06/06-138r2.txt
<quote>
The unit number selected shall be negative, and /will not conflict/ with any positive unit
number, any negative unit number used for uddtio child unit number, /error codes
(INQUIRE)/ [emphasis mine], nor the * units.
</quote>
I didn't explicitly mention -ve error code exclusion in my post since the proposal text
already did.
cheers,
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
|
|