Re: Need Help: compiling old Fortran program
- From: "Wade Ward" <invalid@xxxxxxxxxxxx>
- Date: Sun, 1 Jul 2007 13:53:18 -0400
"Tim Prince" <timothyprince@xxxxxxxxxxxxx> wrote in message
news:eLOhi.42950$5j1.11788@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Wade Ward wrote:You have a single do-loop. You have a test condition that transfers control
"Terence" <tbwright@xxxxxxxxx> wrote in messageI don't think anyone is disputing that multiple nested DO loops are
news:1183244891.202983.244630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm in a different time zone from most of you so many new messages areGood heck, show it to us.
posted before I get to see and reply to a comment on my previous
contribution.
I was trying to say (I was the "Fortran guy" for the 1960's at IBM who
invented Fortran) that the
compilers then, strange today, allowed inner do loops to branch to
the endpoints to the same level or outer endpoints (and of course many
more obsolete syntax).
Later in Shell I was in charge of updating the UCL BMP statistical
package modules, which used card positions 73-80 as line sequence
numbers and as indicators of delete/insert of quarterly updates. This
Fortran code also has almost all multi-levl do-loops ending on the
same sequence number where possible.
I believe this to have been legal at the time. Certainly IBM mainframe
code was full of it.
I have also often SEEN the illegal (always) but accetpted branching to
the label of the outmost CONTINUE of a nested DO-loop set including
single loops.
I have just this minute wrirren a short test program for the above
same-ended multiple do-loop usage and compiled it with the 1985 MS F77
v3.31.There were no errors, and it ran correctly.
permitted to end on a single CONTINUE. The question is about the practice
of branching from outside the DO to the CONTINUE which ends the DO loop.
I agree with Terence that this was a common practice in code written for
certain IBM mainframe compilers.
For example,
IF(INIT.GT.LAST)GOTO 99
DO 99 I=INIT,LAST
C...somestuff
99 CONTINUE
where f90 not only required the compiler to diagnose the bad stuff, but
f77 had already made it unnecessary.
to 99 before it DOes anything. If the test condition fails, control goes
through the do-loop and ends up, likewise, at 99. I think it's a stretch to
call this "same-ended multiple do-loop usage."
--
I found right away 2 on-line references about f66 extended DO implemented
as an extension in f90 compilers:
http://alpha.caspur.it/FORTRAN_DOC/www.compaq.com_80/fortran/docs/lrm/lrm0137.htm
http://www.docs.hp.com/en/B3908-90002/ch10s26.html
Presumably, these compilers would diagnose the extension of an extension.
No doubt, the first of those pages contributes to continued confusion
about who is responsible for which compiler, and which compilers are still
supported.
.
- Follow-Ups:
- Re: Need Help: compiling old Fortran program
- From: Richard Maine
- Re: Need Help: compiling old Fortran program
- References:
- Re: Need Help: compiling old Fortran program
- From: Terence
- Re: Need Help: compiling old Fortran program
- From: Wade Ward
- Re: Need Help: compiling old Fortran program
- From: Tim Prince
- Re: Need Help: compiling old Fortran program
- Prev by Date: Re: survey: Fortran on VMS
- Next by Date: Re: Please help me understand my code
- Previous by thread: Re: Need Help: compiling old Fortran program
- Next by thread: Re: Need Help: compiling old Fortran program
- Index(es):
Relevant Pages
|