[Info-vax] [OT] Current students apparently can't read Fortran code...
Don Baccus
dhogaza at gmail.com
Fri Apr 15 09:24:25 EDT 2022
On Friday, April 15, 2022 at 5:40:53 AM UTC-7, Arne Vajhøj wrote:
> On 4/15/2022 8:32 AM, Don Baccus wrote:
> > On Friday, April 15, 2022 at 5:18:33 AM UTC-7, Arne Vajhøj wrote:
> >> On 4/15/2022 8:04 AM, Dan Cross wrote:
> >>> I took a peak at a few files; it seems pretty archaic to me.
> >> If you look at the .f files that are supposedly 77 then
> >> it really just are old fixed format - the code are full of
> >> 90 features.
> >>
> >> Example advc1d.f - code starts in column 7, comments are
> >> a c in column 1 - but the code would not build with 77.
> >>
> >> Declarations like:
> >>
> >> integer, intent(IN) :: kk
> >>
> >> Loops like:
> >>
> >> do k=1,kk
> >> ...
> >> end do
> > As they said, they kept the "spirit" of some of the older code while
> > embracing newer FORTRAN. :)
> >
> > If they've been using some sort of source control software then it
> > makes sense..
> >
> > Rewriting bits to take advantage of F90 features while maintaining
> > old-style formatting gives you meaningful diffs. If you go in to fix a
> > bug or to improve the physics in a chunk of the code might as well take
> > advantage of newer constructs. That chunk is going to show up in a diff
> > whether or not you do so.
> >
> > But taking advantage of the freedom to not start statements in column
> > 7, etc, and reformatting whole files will yield diffs that
> > essentially say "yep, the entire files are different". Not very
> > useful for tracking the history of changes, it would for all
> > practical purposes reset the baseline to the moment at which the file
> > was reformatted.
> >
> > Mixing styles within a single source file would just be confusing,
> > there's something to be said for consistency.
> Of course it makes sense. Lots of places have done
> something like that. And not just for Fortran.
>
> But there is a big discrepancy between the actual code and the
> early discussion we had about it here. We started talking II, IV
> and 66. It it is really 77 and 90.
>
> Arne
"But there is a big discrepancy between the actual code and the
early discussion we had about it here. We started talking II, IV
and 66. It it is really 77 and 90."
We don't know if they were talking about Model E or not, though.
More information about the Info-vax
mailing list