It may look like a trivial issue, but I couldn't find any answer through googling. I have this little program :
Program Test_spacing_print
Integer:: N
Real:: A,B
N=4; A=1.0; B=100.0
print*,'N =',N
print*,'A =',A,' B =',B
print '(2(A3,F8.2,1X))' ,'A =',A,' B =',B
print 20, A,B
20 format('A =',F8.2,x,'B =',F8.2)
End Program Test_spacing_print
which gives me the output:
N = 4
A = 1.00000000 B = 100.000000
A = 1.00 B 100.00
A = 1.00 B = 100.00
I want to get rid of the unwanted space that I get after =
sign, i.e. my desired output should look like (1 space after =
):
N = 4
A = 1.00000000 B = 100.000000
A = 1.00 B = 100.00
A = 1.00 B = 100.00
Is it possible in fortran ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…