Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- From: nospam@xxxxxxxxxxxxx (Richard E Maine)
- Date: Mon, 28 Nov 2005 10:26:13 -0800
David Flower <DavJFlower@xxxxxxx> wrote:
> vinnie wrote:
> > Here i am using REWIND command at the end to read the
> > nodal connectivity of a element.As i have like 1000 elements i have to
> > rewind the process to the beginning to read each element's nodal
> > connectivity every time.
> REWIND 42
....
> That being said, I am surprised that you need to do it. Can you not
> store the data in memory when you read the file, and copy them each
> time they are required to be reset
Or, alternatively, if there is some real reason why that won't work, one
could make the file direct access instead of sequential. That would,
however, require that the file be written as direct access in the first
place (or that you did an initial pass to copy the sequential file to a
direct access one); you can't generally just take a "normal" sequential
file and read it as direct access. I'd generally agree with David that
reading it all into memory in one pass is probably preferred; the direct
access alternative is only for if that approach won't do.
Also, the subject line a bit puzzles me. I'll skip over the common
confusion of "statement" vs "command" (Fortran doesn't have commands),
but the Fortran 77 vs Fortran 90 part confuses me. The subject line
makes it sound like the OP knows how to do it in Fortran 77 and wants to
know how to do the same thing in Fortran 90. The answer to that would
then be "the same way as you do in Fortran 77". I suspect I am reading
more into the subject line than was intended, but I'll provide this
answer just in case the OP actually was asking about F77 vs f90
differences.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain| experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- References:
- How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- From: vinnie
- Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- From: David Flower
- How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- Prev by Date: Re: Polynomial fitting routines?
- Next by Date: Re: Compaq Visual Fortran discontinued: upgrade to Intel Visual Fortran?
- Previous by thread: Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- Next by thread: Re: How to use REWIND COMMAND of FORTRAN77 in FORTRAN 90
- Index(es):
Relevant Pages
|
|