title: Is there any reason to pass array by first item?
body: <p>In a rather old style Fortran project, I often see this pattern, when an array is passed by its first item:</p>
  <pre><code>program test
      implicit none
      integer :: a(10)
      a(:) = 1
      call sub(a(1), 10) ! here
  contains
      subroutine sub(a, length)
          integer, intent(in) :: length
          integer, intent(in) :: a(length)
          print *, a
      end subroutine
  end program
  </code></pre>
  <p>where it could be:</p>
  <pre><code>    call sub(a, 10) ! here
  </code></pre>
  <p>which is valid even in Fortran 77.</p>
  <p>Note the size of the array has to be passed and used explicitly, this will not work for assumed shape array:</p>
  <pre><code>    subroutine sub(a)
          integer, intent(in) :: a(:)
          print *, a
      end subroutine
  </code></pre>
  <p>For me this is confusing, as the call suggests a scalar is passed to the subroutine. I suppose it works because the array is passed by reference.</p>
  <p>Is there any reason to pass arrays like this, especially now?</p>