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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fortran version(s) ? 1

Status
Not open for further replies.

bobo12

Programmer
Dec 26, 2004
74
US
so suppose u are 22 yrs old & left with a poorly commented fortran program from developers in the 90's, how can i tell which version of fortran they used?

are there clearn indications that would tell me otherwise?

and i don't know if it was before or after year 1995.
 
Normally F77 or F90.

Fortran I (1954?) & Fortran II (Pre-1966) - only has arithmetic If statements. All the code begins in column 7. Identifiers are restricted to 6 chars.

Fortran IV (1966 to appx 1982) - Has logical ifs and probably computed gotos. Code still begins in column 7, identifiers 6 chars. Look at the write statements. If it has asterisks, it isn't this version. Continuation lines (anything in column 6) restricted to 20.

Fortran 77 - Not so many labels, identifier names of more than 6 chars. Has a program statement. Chances are it will probably be this one. The compilers only came out in the 80s.

Fortran 90 - Has :: on identifier declarations and modules. Maybe type statements as well.

Fortran 95 - Has dynamic memory allocation. This is post 96. The standard only came out in 96 and the compilers later than that.
 
thanks boss, i have to say, i am a member of other online forums but this forum has on the most part really quality responses to some good ?'s.
 
Some additions:
1. The PROGRAM statement was in FORTRAN II too. It returns in standard Fortran in F77.
2. List i/o (with *) was in many FORTRAN IV implementation too. It was legalized in F77.
3. The true F77 signature: IF block statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top