This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
DEFAULT_RECL too low?
- From: FranÃois-Xavier Coudert <Francois-Xavier dot Coudert at lcp dot u-psud dot fr>
- To: gfortran <fortran at gcc dot gnu dot org>
- Date: Wed, 02 Mar 2005 10:48:23 +0100
- Subject: DEFAULT_RECL too low?
- Organization: Laboratoire de Chimie Physique
Hi all,
I'm working on PR libfortran/20257 (writing a array larger than, for
example, 700 reals with default format, fails with runtime error).
When a unit is opened with no RECL parameter, it is set to DEFAULT_RECL,
which is hard-coded in libgfortran/io/io.h to be 10000). Unfortunately, when
we issue a simple list-directed write statement, such as in:
real(kind=4) :: array(700)
array(:) = 0
open (10, file='foo')
write(10,*) array
end
The length needed to output array in the default format is greater than
10000, thus throwing an I/O error ("End of record"). This is of course a Bad
Thing. I am not sure I see a reason for setting so low a DEFAULT_RECL, so I
am asking: is there a reason that I don't see that would prevent us from
setting the recl value of newly-opened units much higher?
FX