MODULE const INTEGER, PARAMETER :: dp = KIND(1.0d0), sp = KIND(1.0e0) REAL(KIND=dp), PARAMETER :: dpi = 3.141592653589793d0 END MODULE const !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! PROGRAM test USE const IMPLICIT NONE ! This program demonstrates uninitialized variables. ! ! An uninitialized variable is one that is used in a ! computation before it is given a value. This is ! VERY DANGEROUS ! to do since the results are unpredictable. REAL(KIND=dp) :: b INTEGER :: i WRITE(*,*) 'Prinout the value of b without defining it' WRITE(*,*) 'b = ',b WRITE(*,*) 'The value for b can be anything' WRITE(*,*) WRITE(*,*) 'Prinout the value of i without defining it' WRITE(*,*) 'i = ',i WRITE(*,*) 'The value for i can be anything' END PROGRAM test !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! OUTPUT on Linux Gfortran !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Print out the value of b without defining it ! b = 1.35176793966116256E-312 ! The value for b can be anything ! ! Print out the value of i without defining it ! i = 32764 ! The value for i can be anything ! !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! OUTPUT on PC Gfortran !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Prinout the value of b without defining it ! b = 1.1978127517775181E-317 ! The value for b can be anything ! ! Prinout the value of i without defining it ! i = 0 ! The value for i can be anything ! !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! OUTPUT on Linux Portland Group Compiler !!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Print out the value of b without defining it ! b = 9.77524892306291954E-317 ! The value for b can be anything ! ! Print out the value of i without defining it ! i = -1056 ! The value for i can be anything