title: Convert an array row of REAL to a comma delimited string
body: <p>I have a very old Fortran program which converts data from one text format to another. In one place it handles an array of data allocated as follows:</p>
  
  <pre><code>  real*4, allocatable   :: s(:,:) ! is the declaration
    ! ...
    allocate (s(16,k)) ! is the allocation
    ! then, in a loop later on:
    do i=1,k
       write (7,*) (s(j,i),j=1,16)
    end do   
  </code></pre>
  
  <p>The output from that code looks like this:</p>
  
  <blockquote>
    <p>-1.375000      -1.375000       327277.0       328682.0       2.750000      0.1250000      0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00  0.0000000E+00   1.000000       5.000000       400.0000       1.000000    </p>
  </blockquote>
  
  <p>I need it to look like this:</p>
  
  <blockquote>
    <p>-1.375,-1.375,-.125,1.375,1.375,0,0,0,0,0,0,0,1,5,1,1</p>
  </blockquote>
  
  <p>The thing that is most important is that I get a comma to delimit the fields, rather than other whitespace.</p>
  
  <p>Using the <code>FORMAT</code> statement, how could that be done?</p>
  
  <p>EDIT: I note that this line: <code>write (7, "(*(F8.5,:,','))") s(:,i)</code></p>
  
  <p>...produces output that looks like this:</p>
  
  <pre><code> 3.00000, 4.50000, 1.00000,********, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 5.00000,********, 1.00000
   3.00000, 4.50000,********,********, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 0.00000, 5.00000,********, 1.00000
  </code></pre>
  
  <p>I don't know what the <code>********</code> signifies; the strings that are supposed to be there are stored as REAL but evaluate to integers like <code>101</code> or <code>52</code></p>