Re: Need Help: compiling old Fortran program
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Sat, 30 Jun 2007 10:36:45 -0800
Richard Maine wrote:
(snip)
Oh, and there was no Fortran 77 in 1975. Fortran 77 came into existance
in 1978 (in spite of the name). There weren't compilers for it until
more like 1980. Possibly 1979 or so. I don't recall exactly when the
first f77 compiler was, but certainly not until after 1975. In 1975 the
technical details of the proposed language wouldn't have even yet been
settled. It might have been using features that the author expected
woudl probably be in f77, based on early drafts.
I was using WATFIV in 1974 with many Fortran 77 features. I don't
know the path from the (not yet) standard to the compiler, but it did
have them.
This is not a widely adopted extension. You will probably have trouble
finding compilers today that will accept it. And it doesn't tend to be
the kind of thing where you can throw a switch and ask that it be
accepted. It isn't just a question of style. Unless a compiler
specifically recognizes and supports the feature, it won't even be able
to tell what was intended. The intent is not logically obvious by any
deduction from standard Fortran.
I had to go back to find an example of the code in question:
30 DO 40 J = 1,137
> IF (R(J) .EQ. 0.D0) GO TO 40 .... !!!!!LINE 585!!!!!
> AR = PI * R(J)**2 * 1.0D-08
> DO 40 I = 1,NWVL ... !!!!!LINE 587!!!!!
> ALFA = 2.0D0 * PI * R(J) / WVL(I)
> SIGEXT(I,J) = QEXT1(ALF,QT,ALFA) * AR
> 40 CONTINUE
Looking at this, and making some simple assumptions (not required
by the standard) on the implementation of DO, I could possibly
see this work for J.GT.1. If you consider the equivalent
code made from IF and GOTO, at the end of the I loop I will be
have the appropriate value to exit the loop. The first time
through I is undefined, and reasonably likely won't have the
required value.
That is, under the assumption that the compiler does not specifically
allow this non-standard coding style and does not do special DO
optimizations. What is the value of I before the J loop?
-- glen
.
- References:
- Need Help: compiling old Fortran program
- From: Förster vom Silberwald
- RE: Need Help: compiling old Fortran program
- From: meek
- Re: Need Help: compiling old Fortran program
- From: Förster vom Silberwald
- Re: Need Help: compiling old Fortran program
- From: Richard Maine
- Need Help: compiling old Fortran program
- Prev by Date: Re: Unsigned Integers and Fortran
- Next by Date: Re: How do use Pointer to reduce "type" size in the operation?
- Previous by thread: Re: Need Help: compiling old Fortran program
- Next by thread: Re: Need Help: compiling old Fortran program
- Index(es):
Relevant Pages
|