print_kind_info Subroutine

public subroutine print_kind_info(iw)

Print informations about the used data types.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: iw

Source Code

   SUBROUTINE print_kind_info(iw)
      !! Print informations about the used data types.

      INTEGER, INTENT(IN)                                :: iw

      WRITE (iw, '( /, T2, A )') 'DATA TYPE INFORMATION:'

      WRITE (iw, '( /,T2,A,T79,A,2(/,T2,A,T75,I6),3(/,T2,A,T67,E14.8) )') &
         'REAL: Data type name:', 'dp', '      Kind value:', KIND(0.0_dp), &
         '      Precision:', PRECISION(0.0_dp), &
         '      Smallest non-negligible quantity relative to 1:', &
         EPSILON(0.0_dp), &
         '      Smallest positive number:', TINY(0.0_dp), &
         '      Largest representable number:', HUGE(0.0_dp)
      WRITE (iw, '( /,T2,A,T79,A,2(/,T2,A,T75,I6),3(/,T2,A,T67,E14.8) )') &
         '      Data type name:', 'sp', '      Kind value:', KIND(0.0_sp), &
         '      Precision:', PRECISION(0.0_sp), &
         '      Smallest non-negligible quantity relative to 1:', &
         EPSILON(0.0_sp), &
         '      Smallest positive number:', TINY(0.0_sp), &
         '      Largest representable number:', HUGE(0.0_sp)
      WRITE (iw, '( /,T2,A,T72,A,4(/,T2,A,T61,I20) )') &
         'INTEGER: Data type name:', '(default)', '         Kind value:', &
         KIND(0), &
         '         Bit size:', BIT_SIZE(0), &
         '         Largest representable number:', HUGE(0)
      WRITE (iw, '( /,T2,A,T72,A,/,T2,A,T75,I6,/ )') &
         'LOGICAL: Data type name:', '(default)', &
         '         Kind value:', KIND(.TRUE.)
      WRITE (iw, '( /,T2,A,T72,A,/,T2,A,T75,I6,/ )') &
         'CHARACTER: Data type name:', '(default)', &
         '           Kind value:', KIND('C')

   END SUBROUTINE print_kind_info