title: Fortran: How to read to an array from a file
body: <p>I'm trying to read integers from a file to an array.  But I get an error when I run the program.</p>
  
  <pre><code>PROGRAM MINTEM
  
  INTEGER TEMP(4,7), I, J, MINIMUM, CURRENT
  
  OPEN(UNIT=1, FILE='temps.dat')
  READ (1,*) ((TEMP(I,J),J=1,7),I=1,4)
  
  MINIMUM = TEMP(1,1)
  DO I = 1,4
      DO J = 1,7
          IF (TEMP(I,J) &lt; MINIMUM) THEN
              MINIMUM = TEMP(I,J)
          END IF
      END DO
  END DO
  
  
  PRINT *, "MINIMUM TEMPERATURE = ", MINIMUM
  END PROGRAM MINTEM
  </code></pre>
  
  <p>Input file looks like this:</p>
  
  <pre><code> 22
  100 90 80 70 60 100 90 80 70 60 100 90 80 70 60 100 90 80 70
  100 90
  </code></pre>