075. KIND numbers of types are not portable across compilers and should not be used directly.#
topic: Data types
Note
This tip is a draft1.
KIND numbers of types are not portable across compilers and should not be used directly. It’s better to use the named constants from iso_fortran_env. For both gfortran and Intel Fortran
use iso_fortran_env print*,int8,int16,int32,int64
gives 1 2 4 8, but NAG gives 1 2 3 4.
KIND numbers of types are not portable across compilers and should not be used directly. It's better to use the named constants from iso_fortran_env. For both gfortran and Intel Fortran
— FortranTip (@fortrantip) January 5, 2022
use iso_fortran_env
print*,int8,int16,int32,int64
gives 1 2 4 8, but NAG gives 1 2 3 4.
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.