CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Fortran: Seeking data in files.

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   April 26, 2002, 11:08
Default Fortran: Seeking data in files.
  #1
cfd guy
Guest
 
Posts: n/a
Hi people,
I was wondering if I can extract a specific data from a file using a subroutine in FORTRAN. Which command can I use? Below, I'll show a simple example. Suppose that I have a file, TEST.DAT, and this file has the following lines:
. . . . . VAR = 10 VAR2 = 50 /* COMMENT */ TIME = 100 VAR3 = 30 . . . . .
I want to extract the value from TIME variable. How can I do that? Important, this variable doesn't remain constant in a certain line. Is there any function in FORTRAN that I can seek this characters ('TIME = ') and then READ it (100) in my subroutine? I hope anyone of you can help me.
Kind regards, cfd guy
  Reply With Quote

 


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF issue MASOUD Fluent UDF and Scheme Programming 14 December 6, 2012 13:39
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51
grid data to be read by Fortran code seckin FLUENT 0 April 19, 2003 14:03


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