Reading Fortran Data
beliavsky at aol.com
Mon Jan 22 04:26:17 CET 2007
Carl Banks wrote:
> > A Fortran
> > list-directed write can print results in an almost arbitrary format,
> > depending on the compiler. Many compilers will separate integers by
> > several spaces, not just one, and they could use commas instead of
> > spaces if they wanted.
> 1. Hardly any compiler will produce a line of two integers, or reals,
> that another compiler couldn't read back.
Yes, but for more than three numbers, the statement is wrong. Intel
Fortran prints four double precision random n
0.555891433847495 0.591161642339424 0.888434673900224
but g95 prints them on a single line. I advise against using
list-directed Fortran writes to create files that other programs will
read, and I think most experienced Fortran programmers would agree.
More information about the Python-list