Is there a way in Fortran to write float numbers as 17,3
and not 17.3
, changing the dot to a comma?
I have some large data sets wirtten to a .csv by a subroutine, and i want to do some Excel on it. The german version of Excel uses .
as a seperator in floating point numbers. I know i can use the import feature to handle it, or use Nodepad++ to search and replace .
with ,
.
But i do generate lots of these files, and the subroutine will be used by others, so an Excel ready file would be nice.
If you're just writing a line or two you can add the decimal edit descriptor
dc
to your output format. Here's a simple examplewhich produces
If you want to write to a file, add the clause
to your
open
statement, for example:Of course, here I'm (re-)opening stdout to write commas rather than points.