!--
! *** Caution!! ***
!
! This file is generated from "dcstringputline.rb2f90" by Ruby 2.3.3.
! Please do not edit this file directly.
!
! [JAPANESE]
!
! â€»â€»â€» æ³¨æ„!!! â€»â€»â€»
!
! ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã¯ "dcstringputline.rb2f90" ã‹ã‚‰ Ruby 2.3.3
! ã«ã‚ˆã£ã¦è‡ªå‹•ç”Ÿæˆã•ã‚ŒãŸãƒ•ã‚¡ã‚¤ãƒ«ã§ã™.
! ã“ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ç›´æŽ¥ç·¨é›†ã—ã¾ã›ã‚“ã‚ˆã†ãŠé¡˜ã„è‡´ã—ã¾ã™.
!
!
!++

subroutine PutLineInt1( array, lbounds, ubounds, unit, indent, sd )
                                          !
  ! æ•°å€¤åž‹é…åˆ—ã®è¦ç´„ã‚’ä»¥ä¸‹ã®ã‚ˆã†ã«å°å—ã—ã¾ã™.
  ! avg ã¯å¹³å‡å€¤, sd ã¯æ¨™æº–åå·®ã§ã™.
  ! æ¨™æº–åå·®ã¯, è«–ç†åž‹ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•° sd ã«çœŸã‚’ä¸ŽãˆãŸã¨ãã®ã¿
  ! è¡¨ç¤ºã—ã¾ã™.
  !
  ! Summary of numerical array is printed as follows.
  ! "avg" is average value, "sd" is standard deviation.
  ! Standard deviation is displayed only when .true. is set to
  ! logical optional argument "sd".
  !
  !   #<INT-ARRAY:: @size=(1:3), @max=3, @min=1, @avg=2. @sd=0.816496611>
  !   #<SP-ARRAY:: @size=(1:1), @max=0., @min=0., @avg=0. @sd=0.>
  !   #<DP-ARRAY:: @size=(1:3,1:3,1:3), @max=20., @min=7., @avg=13.5 @sd=3.29140282>
  !
  ! *array* ã«ã¯æ•´æ•°, å˜ç²¾åº¦å®Ÿæ•°, å€ç²¾åº¦å®Ÿæ•°ã®é…åˆ— (1 ã€œ 7) ã‚’
  ! ä¸Žãˆã¾ã™. é…åˆ—æ·»å—ã®ä¸‹é™ã¨ä¸Šé™ã‚’è¡¨ç¤ºã—ãŸã„å ´åˆã«ã¯,
  ! ä»¥ä¸‹ã®ã‚ˆã†ã« *lbounds* ã¨ *ubounds* ã‚’æŒ‡å®šã—ã¾ã™.
  ! ã“ã‚Œã‚‰ã‚’æŒ‡å®šã—ãªã„å ´åˆã«ã¯,
  ! è¡¨ç¤ºã•ã‚Œã‚‹é…åˆ—æ·»å—ã¯ 1:<é…åˆ—ã‚µã‚¤ã‚º> ã¨ãªã‚Šã¾ã™.
  !
  ! Integer, single precision, and double precision array
  ! (1 -- 7) is given to *array*.
  ! In order to print the upper bound and the lower bound
  ! for subscript of array,
  ! specify *lbounds* and *ubounds* as follows.
  ! Otherwise, 1:<size of array> is printed as subscript of array.
  !
  !   program putline_test
  !     use dc_string, only: PutLine
  !     real:: rarray(-2:2, -3:3)
  !
  !     rarray(-2:0, -3:0) = -1.0
  !     rarray(-2:0, 1:3) = -2.0
  !     rarray(1:2, -3:0) = 1.0
  !     rarray(1:2, 1:3) = 2.0
  !     call PutLine ( rarray, &
  !       & lbounds = lbound(rarray), ubounds = ubound(rarray) )
  !   end program putline_test
  !
  ! *unit* ã«ã¯å°å—ã™ã‚‹è£…ç½®ç•ªå·ã‚’æŒ‡å®šã—ã¾ã™. ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã¯æ¨™æº–å‡ºåŠ›ã§ã™.
  ! *indent* ã«ã¯å—ä¸‹ã’ã®ãŸã‚ã®ç©ºç™½ã‚’ä¸Žãˆã¾ã™.
  !
  ! Unit number for print is specified to *unit*. Default is standard output.
  ! Blank for indent is specified to *indent*.
  !

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = array

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt1

subroutine PutLineInt2( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt2

subroutine PutLineInt3( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt3

subroutine PutLineInt4( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt4

subroutine PutLineInt5( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt5

subroutine PutLineInt6( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt6

subroutine PutLineInt7( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  integer, intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str, sd_str
  integer:: max_value, min_value
  integer, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<INT-ARRAY:: @size=%c, @max=%d, @min=%d, @avg=%r%c>', &
    & i = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineInt7

subroutine PutLineReal1( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = array

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal1

subroutine PutLineReal2( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal2

subroutine PutLineReal3( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal3

subroutine PutLineReal4( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal4

subroutine PutLineReal5( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal5

subroutine PutLineReal6( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal6

subroutine PutLineReal7( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real, intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str, sd_str
  real:: max_value, min_value
  real, allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<SP-ARRAY:: @size=%c, @max=%r, @min=%r, @avg=%r%c>', &
    & r = (/max_value, min_value, avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineReal7

subroutine PutLineDouble1( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:)
  integer, intent(in), optional:: lbounds(1)
  integer, intent(in), optional:: ubounds(1)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(1), ubound_nums(1)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = array

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble1

subroutine PutLineDouble2( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:)
  integer, intent(in), optional:: lbounds(2)
  integer, intent(in), optional:: ubounds(2)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(2), ubound_nums(2)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble2

subroutine PutLineDouble3( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:,:)
  integer, intent(in), optional:: lbounds(3)
  integer, intent(in), optional:: ubounds(3)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(3), ubound_nums(3)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble3

subroutine PutLineDouble4( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:,:,:)
  integer, intent(in), optional:: lbounds(4)
  integer, intent(in), optional:: ubounds(4)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(4), ubound_nums(4)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble4

subroutine PutLineDouble5( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:)
  integer, intent(in), optional:: lbounds(5)
  integer, intent(in), optional:: ubounds(5)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(5), ubound_nums(5)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble5

subroutine PutLineDouble6( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(6)
  integer, intent(in), optional:: ubounds(6)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(6), ubound_nums(6)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble6

subroutine PutLineDouble7( array, lbounds, ubounds, unit, indent, sd )

  use dc_types, only: DP, STRING, STDOUT
  use dc_string, only: toChar
  use dc_string, only: Printf, CPrintf
  use dc_present, only: present_and_true
  implicit none
  real(DP), intent(in):: array(:,:,:,:,:,:,:)
  integer, intent(in), optional:: lbounds(7)
  integer, intent(in), optional:: ubounds(7)
  integer, intent(in), optional:: unit
  character(*), intent(in), optional:: indent
  logical, intent(in), optional:: sd
  integer:: out_unit
  integer:: indent_len
  character(STRING):: indent_str
  integer:: i
  integer:: alldim_size, lbound_nums(7), ubound_nums(7)
  character(STRING):: size_str, sd_str
  real(DP):: max_value, min_value
  real(DP), allocatable:: array_packed(:)
  real:: avg_value, variance_value, sd_value
continue

  !-----------------------------------------------------------------
  !  ã‚ªãƒ—ã‚·ãƒ§ãƒŠãƒ«å¼•æ•°ã®ãƒã‚§ãƒƒã‚¯
  !  Check optional arguments
  !-----------------------------------------------------------------
  if ( present(unit) ) then
    out_unit = unit
  else
    out_unit = STDOUT
  end if

  indent_len = 0
  indent_str = ''
  if ( present(indent) ) then
    if (len(indent) /= 0) then
      indent_len = len(indent)
      indent_str(1:indent_len) = indent
    end if
  end if

  !-------------------------------------------------------------------
  !  é…åˆ—ã‚µã‚¤ã‚º
  !  Array size
  !-------------------------------------------------------------------

  if ( present(lbounds) .and. present(ubounds) ) then
    lbound_nums = lbounds
    ubound_nums = ubounds
  else
                        lbound_nums(1) = lbound( array, 1 )
    ubound_nums(1) = ubound( array, 1 )

    lbound_nums(2) = lbound( array, 2 )
    ubound_nums(2) = ubound( array, 2 )

    lbound_nums(3) = lbound( array, 3 )
    ubound_nums(3) = ubound( array, 3 )

    lbound_nums(4) = lbound( array, 4 )
    ubound_nums(4) = ubound( array, 4 )

    lbound_nums(5) = lbound( array, 5 )
    ubound_nums(5) = ubound( array, 5 )

    lbound_nums(6) = lbound( array, 6 )
    ubound_nums(6) = ubound( array, 6 )

    lbound_nums(7) = lbound( array, 7 )
    ubound_nums(7) = ubound( array, 7 )

  end if

  size_str = '('
  size_str = trim(size_str) // trim(toChar(lbound_nums(1))) // ':'
  size_str = trim(size_str) // trim(toChar(ubound_nums(1)))
                      size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(2)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(2)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(3)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(3)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(4)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(4)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(5)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(5)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(6)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(6)))

  size_str = trim(size_str) // ',' // trim(toChar(lbound_nums(7)))
  size_str = trim(size_str) // ':' // trim(toChar(ubound_nums(7)))

  size_str = trim(size_str) // ')'

  !-------------------------------------------------------------------
  !  æœ€å¤§å€¤
  !  Maximum value
  !-------------------------------------------------------------------
  max_value = maxval(array)

  !-------------------------------------------------------------------
  !  æœ€å°å€¤
  !  Minimum value
  !-------------------------------------------------------------------
  min_value = minval(array)

  !-------------------------------------------------------------------
  !  å¹³å‡å€¤
  !  Average value
  !-------------------------------------------------------------------
  alldim_size = size(array)
  avg_value = sum(array) / real(alldim_size)

  !-------------------------------------------------------------------
  !  æ¨™æº–åå·®
  !  Standard deviation
  !-------------------------------------------------------------------
  sd_value = 0.0
  variance_value = 0.0
  sd_str = ''
  if ( present_and_true( sd ) ) then
    if ( alldim_size > 1 ) then
      if (allocated(array_packed)) then
        deallocate(array_packed)
      end if
      allocate( array_packed(alldim_size) )

                            array_packed = pack(array, .true.)

      do i = 1, alldim_size
        variance_value = variance_value + &
          & (array_packed(i) - avg_value) * (array_packed(i) - avg_value)
      end do
      variance_value = variance_value / real(alldim_size)
      sd_value = sqrt( variance_value )
      sd_str = CPrintf ( ' @sd=%r', r = (/ sd_value /) )
    end if
  end if

  !-------------------------------------------------------------------
  !  å°å—
  !  Print
  !-------------------------------------------------------------------
  call Printf(out_unit, &
    & indent_str(1:indent_len) // &
                        & '#<DP-ARRAY:: @size=%c, @max=%f, @min=%f, @avg=%r%c>', &
    & d = (/max_value, min_value/), r = (/avg_value/), &

    & c1 = trim(size_str), c2 = trim(sd_str) )

end subroutine PutLineDouble7

!--
! vi:set readonly sw=4 ts=8:
!
!Local Variables:
!mode: f90
!buffer-read-only: t
!End:
!
!++