Standard intrinsic module ISO_FORTRAN_ENV

Standard intrinsic module ISO_FORTRAN_ENV

Table of Contents

1 Name

iso_fortran_env — standard intrinsic module

2 Usage

USE,INTRINSIC :: ISO_FORTRAN_ENV

(The ',INTRINSIC ::' part is optional, unless there is a user-defined module with the same name.)

3 Synopsis

ISO_FORTRAN_ENV provides named constants describing the Fortran environment.

Kind parameter values for specific types are provided by INT8, INT16, INT32, INT64, REAL32, REAL64 and REAL128. Arrays listing all valid kind parameter values for each type are provided by CHARACTER_KINDS, INTEGER_KINDS, LOGICAL_KINDS and REAL_KINDS.

Storage units are described by CHARACTER_STORAGE_SIZE and NUMERIC_STORAGE_SIZE.

Input/output units are described by ERROR_UNIT, INPUT_UNIT and OUTPUT_UNIT.

The RECL= specifier for the INQUIRE and OPEN statements is described by FILE_STORAGE_SIZE.

IOSTAT= return values are described by IOSTAT_END and IOSTAT_EOR. These and many other IOSTAT= return values are provided by the intrinsic module F90_IOSTAT (except that it provides IOSTAT_EOF instead of IOSTAT_END).

4 Parameter Descriptions

  INTEGER,PARAMETER :: character_kinds(4) = [ KIND('A'), &
                                              SELECTED_CHAR_KIND('JIS_0213'), &
                                              SELECTED_CHAR_KIND('UCS_2'), &
                                              SELECTED_CHAR_KIND('ISO_10646') ]
Array listing all valid kind type parameter values for CHARACTER type.
  INTEGER,PARAMETER :: character_storage_size = 8
The size of a character storage unit in bits.

  INTEGER,PARAMETER :: error_unit = 0
The standard error reporting unit number.

  INTEGER,PARAMETER :: file_storage_size = 8
The size of a file storage unit (used by RECL= in OPEN and INQUIRE) in bits.

  INTEGER,PARAMETER :: input_unit = 5
The standard input unit number. This is the one used by READ with an asterisk ('*') unit.

  INTEGER,PARAMETER :: int8 = SELECTED_INT_KIND(2)
The kind parameter value for an 8-bit integer.

  INTEGER,PARAMETER :: int16 = SELECTED_INT_KIND(4)
The kind parameter value for a 16-bit integer.

  INTEGER,PARAMETER :: int32 = SELECTED_INT_KIND(9)
The kind parameter value for a 32-bit integer.

  INTEGER,PARAMETER :: int64 = SELECTED_INT_KIND(18)
The kind parameter value for a 64-bit integer.

  INTEGER,PARAMETER :: integer_kinds(4) = [ int8,int16,int32,int64 ]
Array listing all valid kind type parameter values for INTEGER type.

  INTEGER,PARAMETER :: iostat_end = -1
The IOSTAT= return value for end of file.

  INTEGER,PARAMETER :: iostat_eor = -2
The IOSTAT= return value for end of record.

  INTEGER,PARAMETER :: logical_kinds(4) = integer_kinds
Array listing all valid kind type parameter values for LOGICAL type.

  INTEGER,PARAMETER :: numeric_storage_size = BIT_SIZE(0)
The size of a numeric storage unit in bits.

  INTEGER,PARAMETER :: output_unit = 6
The standard output unit number. This is the one used by PRINT, and by WRITE with an asterisk ('*') unit.

  INTEGER,PARAMETER :: real32 = SELECTED_REAL_KIND(6)
The kind parameter value for a 32-bit real.

  INTEGER,PARAMETER :: real64 = SELECTED_REAL_KIND(15)
The kind parameter value for a 64-bit real.

  INTEGER,PARAMETER :: real128 = SELECTED_REAL_KIND(30)
The kind parameter value for a 128-bit real.

  INTEGER,PARAMETER :: real_kinds(3) = [ real32,real64,real128 ]
Array listing all valid kind type parameter values for REAL type.

5 Files

The source code for this module may be found in the NAG Fortran runtime library directory (usually /usr/local/lib/NAG_Fortran).

6 See Also

f90_iostat(3), f90_kind(3), nag_modules(3).

7 Bugs

Please report any bugs found to ‘support@nag.co.uk’ or ‘support@nag.com’, along with any suggestions for improvements.

8 Author

Malcolm Cohen, Nihon Numerical Algorithms Group KK, Tokyo, Japan.