title: Importing data from file to array
body: <p>I have 2 dimensional table in file, which look like this:</p>
  
  <pre><code>11, 12, 13, 14, 15
  21, 22, 23, 24, 25
  </code></pre>
  
  <p>I want it to be imported in 2 dimensional array. I wrote this code:</p>
  
  <pre><code>      INTEGER :: SMALL(10)      
        DO I = 1, 3
          READ(UNIT=10, FMT='(5I4)')    SMALL
          WRITE(UNIT=*, FMT='(6X,5I4)') SMALL
        ENDDO
  </code></pre>
  
  <p>But it imports everything in one dimensional array.</p>
  
  <p>EDIT:</p>
  
  <p>I've updated code:</p>
  
  <pre>
      program filet
  
      integer :: reason
      integer, dimension(2,5) :: small
  
      open(10, file='boundary.inp', access='sequential', status='old', FORM='FORMATTED')
      rewind(10)
        DO
          READ(UNIT=10, FMT='(5I4)', iostat=reason)    SMALL
          if (reason /= 0) exit
          WRITE(UNIT=*, FMT='(6X,5I4)') SMALL
        ENDDO
        write (*,*) small(2,1)
      end program
  </pre>
  
  <p>Here is output:</p>
  
  <pre>
          11  12  13  14  15
          21  22  23  24  25
            12
  </pre>