Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran 77 Formatted I/O Format Interpretation

Status
Not open for further replies.

lewb007

Computer
Joined
Apr 14, 2010
Messages
2
Location
US
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
 
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


 
Of course. It's clear now. Thank you, John.
- Lew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top