title: 2D array declaration on FORTRAN77
body: <p>I'm very very new to FORTRAN, so it might be a super easy problem, but I wasn't sure after googling it on web...</p>
  
  <p>Basically consider I have an input.txt file which has size of the 2D array</p>
  
  <p>e.g. input.txt file contains</p>
  
  <blockquote>
    <p>4 5</p>
  </blockquote>
  
  <p>So after opening the file and registering the 4 and 5 on variables <b>row</b> and <b>col</b>, I do the following...</p>
  
  <p>Since FORTRAN77 has a specific format where you have to declare before statements, I was thinking about using <b>SUBROUTINE</b></p>
  
  <p>Here is the idea of SUBROUTINE</p>
  
  <pre><code>SUBROUTINE create(row,col)
      INTEGER array(row,col)
      RETURN
  END
  </code></pre>
  
  <p>I'm not sure if the code is able to run because it has no statements after declaration, but I already get an error saying that</p>
  
  <blockquote>
    <p>Error on line x: Declaration error for array: adjustable dimension on non-argument</p>
  </blockquote>
  
  <p>I'm not sure what's the problem, so I've come down to this</p>
  
  <ol>
  <li>I'm not using array declaration properly (i.e. logical error)</li>
  <li>In FORTRAN you cannot create array custom size (I don't think this will be the case...)</li>
  </ol>
  
  <p>Sample codes and links are welcome, but summary of what I should know will be great!</p>
  
  <p>In addition, FORTRAN77 will be used to compile my code, so I have to stick with FORTRAN77 style</p>