title: Error: Syntax error in argument list at (1)
body: <pre><code>       implicit none
         character*20 fflname, oflname, oflname2
         integer      i, length, rn, s(100)
         real*8       phase_shift
         parameter    ( length = 32768, phase_shift = 0.02 )
         real*8       num, real_coeff, imag_coeff
         real*8       amplitude(length), phase(length)
        &amp;            ,imag_coeff_ps(length), real_coeff_ps(length)
  
         oflname = "wvlt_coeff.data"
         oflname2 = "selection.data"
         fflname = "wvlt_coeff_ps.data"
         open(12, file = oflname)
         do i=1, length
            read(12, *) num, real_coeff, imag_coeff
            real_coeff_ps(i) = real_coeff
            imag_coeff_ps(i) = imag_coeff
         enddo
         close(12)
         open(13, file = oflname2)
         do i=1, 100
            read(13, *) rn
            s(i) = rn
         enddo   
         close(13)    
  
         do i=1, 100
            amplitude(i) = sqrt( real_coeff(s(i))**2 + imag_coeff(s(i))**2 )
            phase(i) = atan( imag_coeff(s(i))/real_coeff(s(i)) ) + phase_shift
            real_coeff_ps(s(i)) = amplitude(i) * cos( phase(i) )
            imag_coeff_ps(s(i)) = amplitude(i) * sin( phase(i) )
         enddo
  
         open(15, file = fflname)
         do i=1, length
            write(15, *) i, real_coeff_ps(i), imag_coeff_ps(i)
         enddo
         close(15)
  
         stop
         end
  </code></pre>
  
  <p>Errors:</p>
  
  <pre><code>hyxie@ubuntu:~$ gfortran '/home/hyxie/Documents/20161012/phase_shift2.f' 
  /home/hyxie/Documents/20161012/phase_shift2.f:35:40:
  
            amplitude(i) = sqrt( real_coeff(s(i))**2 + imag_coeff(s(i))**2 )
                                          1
  Error: Syntax error in argument list at (1)
  /home/hyxie/Documents/20161012/phase_shift2.f:36:36:
  
            phase(i) = atan( imag_coeff(s(i))/real_coeff(s(i)) ) + phase_shift
                                      1
  Error: Syntax error in argument list at (1)
  </code></pre>
  
  <p>What is wrong with my coding?</p>