title: Rank-2 Allocatable Array Declaration With One Dimension Fixed
body: <p>I try to build the following code:</p>
  
  <pre><code>integer, parameter :: N = 2
  real, dimension(1:N,:), allocatable :: ArrayA
  </code></pre>
  
  <p>this leads to the error: </p>
  
  <blockquote>
    <p>bad array specification for an <strong>explicitly shaped</strong> array.</p>
  </blockquote>
  
  <p>I tried doing it the other way around:</p>
  
  <pre><code>integer, parameter :: N = 2
  real, dimension(:,1:N), allocatable :: ArrayA
  </code></pre>
  
  <p>This time, the error is as follows:</p>
  
  <blockquote>
    <p>Bad specification for <strong>deferred shape</strong> array</p>
  </blockquote>
  
  <p>My question is two-fold:</p>
  
  <p>Why are the two cases leading to different errors? How do I declare a 2D array that is allocatable in one direction but fixed in the other?</p>