×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Fortran 77 Formatted I/O Format Interpretation

Fortran 77 Formatted I/O Format Interpretation

Fortran 77 Formatted I/O Format Interpretation

(OP)
I'm revisiting Ftn 77 after many years, and seem to have forgotten how this combination from a NOAA program is interpreted/works:

      READ (*,531) ISTA(1),NO(1),(AMP(J),EPOC(J), J=1,7),ISTA(2),NO(2),
     1 (AMP(J),EPOC(J),J=8,14),ISTA(3),NO(3),(AMP(J),EPOC(J),J=15,21),
     2 ISTA(4),NO(4),(AMP(J),EPOC(J),J=22,28),ISTA(5),NO(5),(AMP(J),
     3 EPOC(J),J=29,35),ISTA(6),NO(6),(AMP(J),EPOC(J),J=36,37)

  531 FORMAT(2I4,F5.3,F4.1,F5.3,F4.1,F5.3,F4.1,F5.3,F4.1,F5.3,F4.1,F5.3,
     1F4.1,F5.3,F4.1)

I couldn't understand how, for example, ISTA(2) and NO(2) are matched with I4 format specs. This applies to integer pairs ISTA(2) and NO(2) through ISTA(6) and NO(6).

Please help me understand how this iolist works with this format statement.

Thank you,  - Lew  

RE: Fortran 77 Formatted I/O Format Interpretation

your read statement contains 6 repeats of 2 integer variables followed by 14 real variables.

6 * ( integer * 2  +  real * 14 )

this is satisfied by the format statement which covers 2 integers and 14 reals, this format is then used for each of the 6 repeats


www.Roshaz.com

RE: Fortran 77 Formatted I/O Format Interpretation

(OP)
Of course. It's clear now. Thank you, John.
- Lew

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources