CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   maximum output line length in fortran under linux (https://www.cfd-online.com/Forums/main/3447-maximum-output-line-length-fortran-under-linux.html)

Sergei Chernyshenko May 11, 2001 05:42

maximum output line length in fortran under linux
 
Hi,

The following code

open(1,file='tw')

x=sin(1.0)

write(1,*) x,x,x,x,x,x,x,x,x

close(1)

stop

end

compiled with g77 or f2c and run under linux produces two lines instead of one in tw: the output line is wrapped somewhere about 80-th column. How to change this behaviour?

Thanks

Sergei

stefan May 11, 2001 07:15

Re: maximum output line length in fortran under li
 
Use a formatted output, e.g.

write(1,'(9e14.6)') x,x,x,x,x,x,x,x,x

Sergei Chernyshenko May 11, 2001 07:25

Re: maximum output line length in fortran under li
 
Thanks, Stefan,

I've just found it out myself 5 min ago :).

Sergei


All times are GMT -4. The time now is 06:34.