You could also write these values to a format string.
character(len=30) :: fmtStr
character(len=4) :: sN
integer :: N
.
.
.
.
write (sN, '(I4)') N
fmtStr = '(1X,'//sN//'(F6.2,1X),2X,'//sN//'(2X))'
write (6, fmtStr) data...
Hope this helps,
cpm
What is the data; all numbers?, text?. I'm assuming integer for simplicity.
ios is assigned the error code from the i/o operation. a value of zero means no gliches, this allows you to read to the end of the file with no 'end-of-file encountered during read' errors.
there is probably a far...
More than likely you are using list directed output:
write (*,*) 'hello'
or
print *, 'hello'
List directed output on some compilers prints a blank character first. To print directly (without blank charater)use explicit formatting :
write (*,'(A)') 'hello'
or
print '(A)', 'hello'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.