title: Rank mismatch in array reference when reading data from a table
body: <p>I have a text file with the following format (11 columns and 8 rows)</p>
  
  <pre><code>Name    Chris    Kyle    Peter    Luke    Sally (...)   
  age     xxxx    xxxx    xxxx    xxxx    xxxx
  height          xxxx    xxxx    xxxx    xxxx
  weight          xxxx    xxxx    xxxx    xxxx
  class           xxxx    xxxx    xxxx    xxxx
  </code></pre>
  
  <p>The first column (chris) only has data in the first row.</p>
  
  <p>I need to build a program to read this table, this is what I have so far but I can't get it to work...</p>
  
  <pre><code>  program readtable
  
    implicit none
    integer :: i, j, num_col, num_row
    double precision, dimension (2) :: a
    character(14), dimension (1) :: variable
  
    num_col = 11
    num_row = 8
  
    open(100,file='SSL.dat',status='old')
    do j=1, num_row
  
          read(100,*) variable(j), (a(i,j), i=1,num_col)
          print*, variable(j), a(i,j)
  
    end do
  
    end program
  </code></pre>
  
  <p>When I run this piece of code I get a rank mismatch.</p>
  
  <p>I want to read the data in this table so that I can then assign the data to specific variables. For instance, If I want to do some stuff with kyle and Peter I know that for Kyle a(:,2) and for Peter a(:,3)</p>
  
  <p>Here is the error I get when I compile with gfortran as a Fortran 90 code</p>
  
  <pre><code>               read(100,*) variable(j), (a(i,j),i=1,num_col))
                                           1
  Error: Rank mismatch in array reference at (1) (2/1)
  </code></pre>