Prev: Best way for integer division
Next: oo fortran
From: Tobias Burnus on 20 Mar 2010 13:53 Tobias Burnus wrote: > Philippe-A. Bourdin wrote: > >> just a simple question: how to inquire the file size of a given file? >> As I heard (from intel support), it should work in ifort like this: >> >>> integer :: n_chars >>> inquire (file='foobar', size=n_chars) >> >> But if I try this in gfortran 4.4 I always only get 32767 as result! >> (This inquire usage is supposed to be Fortran 2003 standard.) > > I have checked the source code of gfortran's run-time library (RTL; > "libgfortran") and it does not handle size= in INQUIRE at all; This has been fixed today for GCC 4.5. Thanks for the report! Tobias
From: Phred Phungus on 25 Mar 2010 20:42
Tobias Burnus wrote: > Tobias Burnus wrote: >> Philippe-A. Bourdin wrote: >> >>> just a simple question: how to inquire the file size of a given file? >>> As I heard (from intel support), it should work in ifort like this: >>> >>>> integer :: n_chars >>>> inquire (file='foobar', size=n_chars) >>> But if I try this in gfortran 4.4 I always only get 32767 as result! >>> (This inquire usage is supposed to be Fortran 2003 standard.) >> I have checked the source code of gfortran's run-time library (RTL; >> "libgfortran") and it does not handle size= in INQUIRE at all; > > This has been fixed today for GCC 4.5. Thanks for the report! > > Tobias Also, tja. Ich wette dass Du bei gfortran im Kaeferfixwettzeug in diesem Entwicklungsjahr erst dran bist. -- froederich |