Re: Fortran



David Flower wrote in message <1138609799.990854.313820@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
>
>robin wrote:
>> David Flower wrote in message <1138351617.714373.148640@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
>> >
>> >If you are new to FORTRAN, I would suggest starting with FORTRAN 77; it
>> >is a sensibloe subset of the 95 standard, although there is always
>> >something that you want from the 95 standard!
>>
>> I wouldn't advise that.
>> The raison d'etre of Fortran 90 and successors is that
>> it eliminates many pitfalls of Fortran 77.
>>
>> It's better right from the start to begin with a Fortran 90
>> or later compiler, and to learn the newer facilities.
>
>Well, I do not seem to have much support out there!
>
>My point was that there is relatively little in FORTRAN 77 that someone
>programming in FORTRAN 90 would need to unlearn.
>
>FORTRAN 90 contains many extensions over FORTRAN 77,

And a great number of improvements.
Some are small, but others are substantial, that combined it
is not worth the trouble of using F77 Some are:
1. Use of > instead of .GT. etc
2. Free form source, which eliminates some common errors
3. avoidance of COMMON and EQUIVALENCE
4. virtual elimination of mis-spelled identifiers
5. avoidance of adjustable dimensions
6. avoidance of mis-matched arguments and dummy arguments.

The avoidance of trivial errors cannot be over-emphasised, for
example,
IF (X .GT .1) C = D
contains a bug that's easily overlooked, namely, that the
test compares X and 1 instead of X and 0.1
and then there are the usual problems of l and 1, 0 and O, and so on.

> and I suspect that
>most programmers have never used a substantial fraction of them!
>However, these same extensions could complicate the learning process.

Not a single one of them does.

>In fact, my personal view is that FORTRAN 90 is structured wrongly; I
>believe that it should have been defined as a core (FORTRAN 77) with a
>set of extensions (e.g.Array assignments etc.). Users would be able to
>specify which extensions they wished to use in any given compilation.
>Compiler suppliers would be able to issue compilers incorporating only
>some of the extensions. Before condemning thos structure outright, ask
>yourself. Would I prefer a compiler tha incorporates the extensions I
>actually require, or a less reliable one that incorporates the full
>FORTRAN 90 ?

And if you're looking for a neat subset, then
consider using F, or ELF90.


.



Relevant Pages

  • Re: history of Fortran 90 and 95 compilers on Linux
    ... The compiler used for R on Windows is a F77 ... This means that portable packages need to be written in correct FORTRAN ... writing R extensions in languages other than C or Fortran 77. ...
    (comp.lang.fortran)
  • Re: USE, ONLY question
    ... Fortran one is exactly the opposite. ... need the help don't know to ask the compiler for it. ... usually don't have many extensions, though partly that is that C is ...
    (comp.lang.fortran)
  • Re: fortran
    ... >> David Flower wrote in message ... >> it eliminates many pitfalls of Fortran 77. ... >> or later compiler, and to learn the newer facilities. ... these same extensions could complicate the learning process. ...
    (comp.lang.fortran)
  • RE: Integrated Developement Environment - looked for...
    ... There are a number of F90 extensions already in the Open Watcom F77 compiler: ... FORTRAN 90 Compliant Extensions ... The following additional I/O specifiers for the INQUIRE statement are supported: ...
    (comp.lang.fortran)
  • Re: OT: FORTRAN
    ... no way to do conversions other than real I/O. ... In point of fact, ENCODE and DECOCE were common extensions, ... I suppose it depends on what you mean by FORTRAN. ... To the best of my knowledge, only CDC FORTRAN used ENCODE and DECODE. ...
    (comp.lang.pl1)