|
[Sponsors] |
January 25, 2007, 11:30 |
Fortran write help
|
#1 |
Guest
Posts: n/a
|
I want to write a set of numbers on the same line.
write(*,*)(x(i),i=1,n) works fine. But I want to control the format. write(*,'(e20.10)')(x(i),i=1,n) puts each number on a new line. Since n is variable I cannot hard code it into the format. Is there any way to achieve this in fortran 77 ? |
|
January 25, 2007, 13:15 |
Re: Fortran write help
|
#2 |
Guest
Posts: n/a
|
try it:
write(*,999)(x(i),i=1,n) 999 format(e20.10,/) Regards Renato. |
|
January 26, 2007, 00:20 |
Re: Fortran write help
|
#3 |
Guest
Posts: n/a
|
Hello Praveen,
you could buildup the appropriate format string in a character variable. Regards, Markus |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 13:06 |
Fortran Compiler-CFX12.1 | Araz | CFX | 13 | March 27, 2017 05:37 |
how to write user fortran for turbulence model | waynezw0618 | CFX | 2 | July 10, 2009 01:55 |
Fortran Compilers to write routines in CFX | Luiz | CFX | 1 | February 11, 2008 13:02 |
visual fortran | Monica | Main CFD Forum | 1 | August 28, 2004 20:45 |