Re: Need Help: compiling old Fortran program




"Tim Prince" <timothyprince@xxxxxxxxxxxxx> wrote in message
news:eLOhi.42950$5j1.11788@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Wade Ward wrote:
"Terence" <tbwright@xxxxxxxxx> wrote in message
news:1183244891.202983.244630@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm in a different time zone from most of you so many new messages are
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.
Good heck, show it to us.
I don't think anyone is disputing that multiple nested DO loops are
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.
You have a single do-loop. You have a test condition that transfers control
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.


.



Relevant Pages

  • Re: Need Help: compiling old Fortran program
    ... I was trying to say (I was the "Fortran guy" for the 1960's at IBM who ... compilers then, strange today, allowed inner do loops to branch to ... I agree with Terence that this was a common practice in code written for certain IBM mainframe compilers. ... these compilers would diagnose the extension of an extension. ...
    (comp.lang.fortran)
  • Re: Is it time to legitimise REAL*8 etc?
    ... Some vendors phased out their F77 compilers over 10 ... No need to support a seperate F77 compiler as, ... experience with F77) that the F95 programming is safer than the F77 ... Authors are not chosing more recent Fortran ...
    (comp.lang.fortran)
  • Re: what is the most suitable Linux platform for Programmers and software developers
    ... C, C++, Perl, Python, Lisp, and a bunch of other languages are supported ... There are FORTRAN compilers, but FORTRAN ... Look at the Linux ...
    (comp.os.linux.misc)
  • Re: Is it time to legitimise REAL*8 etc?
    ... Some vendors phased out their F77 compilers over 10 ... No need to support a seperate F77 compiler as, ... experience with F77) that the F95 programming is safer than the F77 ... COMMONs remain available with any FORTRAN version. ...
    (comp.lang.fortran)
  • Declaration to get 8-bit (or 16-bit) integer?
    ... Supported by all the current compilers that I've tried it on. ... Not likely to become standard in the foreseeable future. ... Syntax standard-conforming, but semantics not guaranteed of course. ... The meaning of the code not obvious to anyone but a Fortran guru. ...
    (comp.lang.fortran)