Is there a way to change the period decimal separator for a comma?.
Also, how can I make the output numbers have a thousand separator?. This could be a comma, a period, a space ...
Is there a way to change the period decimal separator for a comma?.
Also, how can I make the output numbers have a thousand separator?. This could be a comma, a period, a space ...
a quick and dirty fortran based approach:
You can write a C++ function which will convert the number in a string in you current locale for you.
call from Fortran:
On my machine it prints
123 456,123
:Disclaimer: I am not a C++ programmer and he solution can be slow. Maybe the brute force approach in Fortran is better.
I used this answer as a base: https://stackoverflow.com/a/2648663/721644
Use the Argument DECIMAL='COMMA' when opening a file
This will change the decimal to comma