title: Best declaration order in Fortran?
body: <p>I have actually a nested question :</p>
  
  <ol>
  <li>Does the order of variable declaration matter in Fortran?</li>
  <li>If yes, what is the best order to declare variables?</li>
  </ol>
  
  <p>For example, is this program :</p>
  
  <pre><code>PROGRAM order1
  IMPLICIT NONE
  DOUBLE PRECISION,DIMENSION(:,:),ALLOCATABLE:: array_double_2D
  DOUBLE PRECISION,DIMENSION(:),ALLOCATABLE:: array_double_1D
  INTEGER,DIMENSION(:),ALLOCATABLE:: array_int_1D
  INTEGER :: int1,int2
  LOGICAL :: boolean1,boolean2
  ... instructions ...
  </code></pre>
  
  <p>better than this one :</p>
  
  <pre><code>PROGRAM order2
  IMPLICIT NONE
  LOGICAL :: boolean1,boolean2
  INTEGER :: int1,int2
  INTEGER,DIMENSION(:),ALLOCATABLE:: array_int_1D
  DOUBLE PRECISION,DIMENSION(:),ALLOCATABLE:: array_double_1D
  DOUBLE PRECISION,DIMENSION(:,:),ALLOCATABLE:: array_double_2D
  ... instructions ...
  </code></pre>
  
  <p>?</p>
  
  <p>(by "better", I mean efficient in memory management and faster)</p>
  
  <p>Thanks for your answers!</p>