Just an hobbyst opinion:
I find handy to use it to (hopefully) a portable way to specify kind number in
single/double precision versions of procedures to be inserted in object
libraries (think to 'lib.a' file), as in the following snippet:
module foo
use, intrinsic:: ISO_FORTRAN_ENV, only: REAL32, REAL64
implicit none
private
interface goo
module procedure goo_s
module procedure goo_d
end interface
public :: goo
contains
subroutine goo_s (x)
real(kind=REAL32), intent(..) :: x
include 'goo_source.inc'
end subroutine goo_s
subroutine goo_d (x)
real(kind=REAL64), intent(..) :: x
include 'goo_source.inc'
end subroutine goo_d
end module foo
The program module that uses foo is free to specify the kind number it needs
in its own way.
Gigi
|