program array_declare2

  implicit none
  integer :: num=10           

  call declit(num)
  
  contains
  
  subroutine declit(num)

    integer, intent(in) :: num
    integer :: i
    real, dimension(num) :: rh
  
    do i = 1,num
      rh(i) = i*10.
    enddo
    write(*,*) rh
  
  end subroutine declit

end program array_declare2
