line feeds in output files

Hi all,

The code below writes a few variables into a .csv file. It works fine with ifort and gfortran (who interpret RECL= statement as line length), but pgf95 inserts an extra line break after the fourth comma, splitting each output line in two.

Is there some other parameter I should know about to stop pgf95 from splitting the lines?

Thanks!

program test

  a=1.
  b=2.
  c=3.
  d=4.
  e=5.

  open(unit=8, file='test.csv',status='replace',action='write',recl=2048, iostat=ierror)
  do i=1,10
     write(8,*) a,',',b,',',c,',',d,',',e
  end do
  close(8)
end program test

If you use list-directed output, the compiler is free to format (including breaking the line) the output records, independently of the record length specified for the file.

If you want to control the format of the output, you need to specify the format desired.