This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: iso_fortran_env


Steve Kargl wrote:
On Tue, Aug 29, 2006 at 08:52:44AM -0700, Vivek Rao wrote:
For Lahey/Fujitsu Fortran for Linux, the values of the
constants in the ISO_FORTRAN_ENV module are shown
below. I'd like to write an analogous module that I
can use in gfortran, until the module is implemented
in the compiler. What would the values be, for
gfortran on Windows -- i386-pc-mingw32? Thanks.
module ISO_FORTRAN_ENV


  ! Nonintrinsic version for Lahey/Fujitsu Fortran for
Linux.
  ! See Subclause 13.8.2 of the Fortran 2003 standard.

  implicit NONE
  public

  integer, parameter :: Character_Storage_Size = 8
  integer, parameter :: Error_Unit = 0
  integer, parameter :: File_Storage_Size = 8
  integer, parameter :: Input_Unit = 5
  integer, parameter :: IOSTAT_END = -1
  integer, parameter :: IOSTAT_EOR = -2
  integer, parameter :: Numeric_Storage_Size = 32
  integer, parameter :: Output_Unit = 6

end module ISO_FORTRAN_ENV

Everthing above matches gfortran with the possible exception of File_Storage_Size and Numeric_Storage_Size. I don't F2003 handy. What do these values means?

IIRC file storage size is the number of bits per storage element. E.g. when you do a inquire(iolength) you get the answer as an integer multiple of the file storage size. Analogously, numeric storage size is the size in bits of a scalar variable of default kind.


Or something like that, I'm too lazy to look into F2003 atm.



--
Janne Blomqvist


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]