CFD Online Logo CFD Online URL
Home > Forums > Main CFD Forum

Fortran write help

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   January 25, 2007, 12:30
Default Fortran write help
Praveen. C
Posts: n/a
I want to write a set of numbers on the same line.


works fine. But I want to control the format.


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 ?
  Reply With Quote

Old   January 25, 2007, 14:15
Default Re: Fortran write help
Posts: n/a
try it:

write(*,999)(x(i),i=1,n) 999 format(e20.10,/)



  Reply With Quote

Old   January 26, 2007, 01:20
Default Re: Fortran write help
Markus Lummer
Posts: n/a
Hello Praveen,

you could buildup the appropriate format string in a character variable.

Regards, Markus
  Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fortran Compiler-CFX12.1 Araz CFX 13 March 27, 2017 05:37
mesh file for flow over a circular cylinder Ardalan Main CFD Forum 6 April 17, 2010 23:40
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 14:02
visual fortran Monica Main CFD Forum 1 August 28, 2004 20:45

All times are GMT -4. The time now is 13:49.