Re: Automatic allocation of an available file unit



beliavsky@xxxxxxx wrote:
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.

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
.