Using gfortran 4.6. This code:
PROGRAM f1
IMPLICIT NONE
INTEGER :: i=1, j=3
WRITE(*,*) "integer i is ", i, ", and j is ", j, "."
END PROGRAM f1
creates this console output that has too many spaces:
integer i is 1 , and j is 3 .
Is there some kind of setting that I can set so that there is no space before the first token ("integer"), and therefore the spaces between the tokens are just one space? I know that one fix
WRITE(*,'(A,I1,A,I1,A)') "integer i is ", i, ", and j is ", j, "."
but it seems very cumbersome when I have to do it every time I have a print statement, it will rather be more like C ++, where you explicitly write spaces in the output.
source
share