Automatic allocation of an available file unit
- From: Joe Krahn <lastname_at_niehs.nih.gov@xxxxx>
- Date: Thu, 30 Mar 2006 18:14:42 -0500
I noticed that J3 is (finally) implementing automatic file unit allocation:
http://j3-fortran.org/doc/year/06/06-138r2.txt
I see that the plan is to use negative unit numbers for automatically assigned units. It seems to me that there would be fewer conflicts by using positive numbers starting at some number higher than the old compiler limits, an therefore unlikely to conflict with old code using constant unit numbers.
That's just my 2 cents.
I have been strictly avoiding constant unit numbers for a long time, using a function that returns a free UNIT, found by a simple INQUIRE loop, which also returns the unit number in an optional argument, so you can do an open statement like this:
open(unit=file_unit(data_unit), ...)
read(data_unit,...)
Joe
.
- Follow-Ups:
- Re: Automatic allocation of an available file unit
- From: Paul Van Delst
- Re: Automatic allocation of an available file unit
- From: Richard Maine
- Re: Automatic allocation of an available file unit
- Prev by Date: Re: Structure of large link libraries in f95
- Next by Date: Re: Help: IFC stack overflow
- Previous by thread: Help: IFC stack overflow
- Next by thread: Re: Automatic allocation of an available file unit
- Index(es):