Dear all,
I know this may be a very basic question. But I wanted to ask, what are the truly portable or best way to define real 4, real 8, int 4, int 32, etc?
I mean like, I usually do,
integer, public, parameter :: i4=selected_int_kind(9)
integer, public, parameter :: i8=selected_int_kind(15)
integer, public, parameter :: r8=selected_real_kind(15,9)
Then I use things like
integer(kind=i4) i
integer(kind=i8) iseed
real(kind=r8) :: abc
Question,

If you use select kind, how do you specify what is integer 4, integer 8, real 8, etc?

Or is there better to just use iso_fortran_env?
For example, i found a code using that for the ziggurat random number generator,
ecosim/ziggurat.f90 at main Â· sandain/ecosim Â· GitHub