F90 Model : Define Minimum Numeric Specification

LeftRight
Fortran 90 frees the programmer from integer and floating point representation specificity. Use the KINDs that meet the needed precision for the problem. For most numeric work, 64-bit REALs and 32-bit INTEGERs are sufficient. The specification can be encapsulated in a MODULE for easy inclusion.

Fortran 90 has defined several intrinsic functions for retrieving the defining characteristics for each intrinsic type. The following example defines three KIND parameters to handle the three intrinsic types which will be used.

Note how literal constants and variables are declared using these parameter types.

Code examples

LeftRight
Slide 7