Re: Fortran 77 vs Fortran 90/95



In article <1123421236.316374.305450@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"David Flower" <DavJFlower@xxxxxxx> wrote:
[about free source form]

> a) It is gratuitously incompatible with f77

It is incompatible, certainly. That's sort of the nature of new features.
Gratuitously? I might be tempted to describe the use of that term in
this context as gratuitous. :-) You think there was no reason for or
interest in this feature to motivate it? That's what "gratuitous"
would imply.

My observation is that free source form is one of the most widely
accepted and desired features in f90. I don't think I'd use up one
hand in counting the number of people that have expressed dislike
of it (and yes, that's now including you). The main complaint about
it I hear is that it was long overdue. For that matter, nonstandard
variants of free source form are high on the list of things that
people mean when they talk about f77 plus common extensions. I've
seen people say that free source form doesn't even count as "really"
being a new f90 feature because of that.

I've helped more than a handful of programmers who use f77 and
fixed source form find the switch to allow long source lines
in fixed source form as an f77 extension. Indeed, I'm not at
all sure that I haven't seen more users of fixed source form
who use long source lines as an extension than I've seem free
source form users actually write lines that long. After all,
in fixed source form, you don't get to start until column 7,
so you are actually limited to 65 characters if you stick to the
standard.

> b) I use a PC, and most editors, browsers etc. are based on an
> 80-character line. This is also true of other systems.

Could you name perhaps one such? I can't off-hand think of any. I
certainly knew of old terminals, and some newer terminal emulators that
are so based, but I can't think of any editors or browsers.

> I agree that the
> punched card is obsolete, but the 80-character line is not, and to
> deviate from it is wilful stupidity.

You seem to be hung up on free source form implying lines longer than
80 characters. It does not. It *ALLOWS* such lines. You don't
actually have to make your lines exactly 132 characters long any more
than you have to have 29 continuation lines or make all your
arrays rank 7. In my own free source form code, I almost never go
beyond column 80. Heck, I usually stay below 72 or so, not because
that was the old fixed source form limit, but because that's
about long enough for good readability and, yes, because I often
use editor windows that I keep about that size. (The editors
will perfectly well handle more, but I often keep them down to
about that).

It is my impression that most f90 coders keep most of their lines
down to about that size. Have you actually observed otherwise in
a significant sample? If so, I must wonder what kind of population
you draw your samples from. If you don't actually see much of this
(as I don't), I'd have to wonder why the vehemence over such a
matter.
.



Relevant Pages

  • Re: Converting fixed-to-free format
    ... It never did [trigger a message]. ... All would be the result of trying to parse the *crap* as ... Lines longer than 72 in fixed source form are common. ... Converting to free source form should be the first step. ...
    (comp.lang.fortran)
  • Re: Help requested troubleshooting code
    ... I suppose the reason why my program identifier contained a space as in prandtl meyer was because I had originally used prandtl_meyer and my compiler gfortran complained about the underscore, and I figured that it might have been an invalid character to use in the program statement. ... difference between fixed source form and this other form you prefer? ... about fixed source form, ... The simillar thing in free source form is that you can't go past ...
    (comp.lang.fortran)
  • Re: Absoft Fortran Problem
    ... least once the continuation issues get worked out. ... I'm confused, and perhaps the OP is as well, about whether this is f77 ... For fixed source form, which is the only option in f77, you would be ... For f90 free source form, the advice to put the & only on the second ...
    (comp.lang.fortran)
  • Re: NEWBIE QUESTION
    ... >as opposed to fixed source form although free source form was introduced ... name ending .f is in fixed source form, but in .f90 is free source form. ... Some compilers have options like -free or -fixed for specifying it. ...
    (comp.lang.fortran)
  • Re: problem with DATA statement in Intel Compiler
    ... You appear to be referring to fixed source form versus free source form ... rather than f77 versus f95. ...
    (comp.lang.fortran)