Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Is this Fortran 77?

98 views
Skip to first unread message

Jay Braun

unread,
Jun 17, 2021, 5:34:43 PM6/17/21
to
Or is it compatible with the Fortran 90 standard? I was not able to paste with a non-proportional font.

program make_pos_from_input
character*24 date
character*14 x,y,z
real*8 r,ictn,alat,along,wlong
open(10,file='EC_19F21.inp',
+status='old')
open(11,file='EC_19F21.pos',
+status='unknown')
C loop, read input, quit at end of file
1 read(10,10,end=2001) date, ictn,r,alat,wlong
write(11,11) date,ictn,r,alat,wlong
go to 1
2001 continue
C 10 format(A67)
10 format(a24,1x,f13.2,3(1x,e14.7))
11 format(a24,1x,f13.2,3(1x,e13.7))
end

Steve Lionel

unread,
Jun 17, 2021, 5:56:07 PM6/17/21
to
It is not FORTRAN 77. The primary offender is "real*8", which is not in
any Fortran standard. The rest, other than the use of lowercase (which
was non-standard in FORTRAN 77), looks standard-conforming to me. Of
course, fixed-form source is obsolescent in current Fortran.

--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org

Robin Vowels

unread,
Jun 17, 2021, 11:59:50 PM6/17/21
to
On Friday, June 18, 2021 at 7:34:43 AM UTC+10, jaybr...@gmail.com wrote:
.
It isn't FORTRAN 77 because of the long name on the PROGRAM statement;
It does, however, use fixed source form which was FORTRAN 77.
Fixed source form has fields in columns 1-5, 6, and 7 onwards.
.
> Or is it compatible with the Fortran 90 standard?
.
The REAL*8 statement is not standard.
.

Ron Shepard

unread,
Jun 18, 2021, 2:33:07 AM6/18/21
to
It is f77 with several common extensions, including lower case
characters, the underscore in the program name, the 19-character program
name (longer than 6 characters), and the real*8 declaration. All of
those are now standard in modern fortran (f90 and later) except for the
real*8 declaration, which remains nonstandard. I'm assuming here that
the program statement beginning in column 1 is a newsgroup posting
error, it should of course begin in column 7 in fixed-source form.

The character data type, quoted character strings, and the open
statement were introduced in f77, so it is inconsistent with any of the
earlier fortran standards, although at least the open statement was an
extension in some earlier fortran compilers.

$.02 -Ron Shepard

Jay Braun

unread,
Jun 18, 2021, 8:13:29 AM6/18/21
to
Thank you all.
0 new messages