Re: Bugs at my web site

From: Catherine Rees Lay (spamtrap_at_polyhedron.org.uk)
Date: 01/23/04


Date: Fri, 23 Jan 2004 10:14:13 +0000

In article <MoSPb.39540$2L6.22462@bignews6.bellsouth.net>, Charles
Russell <STOPworworSPAM@bellsouth.net> writes
>This is a repeat, slightly edited, of a message sent yesterday that seems to
>have been swallowed up by bellsouth's mail server:
>
>"Catherine Rees Lay" wrote
>
>> I don't think it's being maintained now, but given that Fortran 77 isn't
>> being changed either I can't see why this is an issue.
>
>What requires support is not changes in fortran, but changes in hardware and
>operating systems. Then the power of old code can grow in proportion to
>Moore's law. Piggybacking on gnu C seems ideal, but one would like to have
>a healthy competitive market offering more than one choice. g77 is good,
>but it could be improved.
>Salford ftn77 may be better, but if I can't use my unix makefiles, it is
>just too much trouble to use.
>
>>
>> But if you were using it as a second test compiler to check code for
>> compliance as a one-off, wouldn't it be relatively simple just to do
>> "ftn77 *.for /undef /link"?
>
>Yes, I could. Routinely I use ftnchek, which can find lots of things
>tocomplain about in almost any large old package. However, I am never sure
>what might prove fatal with a new compiler. Neither have I been confident
>that static syntax testing could find all potential problems. My tools have
>run under VMS f77, Lahey f77, SunOS f77, DEC Ultrix f77, g77, and f2c, so
>that I think they are good traditional fortran, whatever some standard might
>say. (I learned from a 12-hour course, McCracken, vendor manuals, examples,
>and trial, not by reading standards. Does anyone but a professional
>programmer actually read a standard?) For several reasons, I would continue
>to write f77 even if I were using an f95 compiler, so for me the potential
>risks outweigh any potential gain. (Among other reasons, as the last
>fortran user in my department, I am unwilling to abandon the bridge provided
>by f2c. I hope the g95 people, after taking a good long vacation to
>celebrate its release, then give some thought to using the g95 front end to
>create an f95_2c.)
>
You're right that static syntax checking can't find everything - this is
one of the areas that ftn77 is so excellent in, which is why I'd
recommend it as an addition to your toolset. But I'd say that running on
that many compilers, while no guarantee, is a reasonable approximation
of portable, safe code. The last thing I found that ran "correctly" on
many compilers but "incorrectly" on one was where a function was used to
hide the fact that the program did a(1:9) = a(2:10) i.e. overlapping
left and right sides of a character string. You can tell how long ago
this was from the fact that it's legal Fortran 90 but illegal Fortran
77. Most often, programs which do illegal things (as opposed to common
extensions) go wrong the first time you go to a different compiler.

As for only professional programmers reading standards, I'm much too
stupid to get directly from reading the standard to writing code (though
I have been known to look things up in it). I generally use the books
written by people who wrote the standard - I can understand them! I
guess at heart I'm still a scientist rather than a Real Programmer :-)

Catherine.

-- 
Catherine Rees Lay
To email me, use my first name in front of the "at".


Relevant Pages

  • Re: Is Linux Unix?
    ... I'm very reluctant to give the GNU compiler a try at this stage. ... Do you mean that you would test my code with the new GNU Fortran 95 compiler? ... That's why I said I'm not a professional programmer. ...
    (Debian-User)
  • Re: Bugs at my web site
    ... what might prove fatal with a new compiler. ... that I think they are good traditional fortran, whatever some standard might ... I hope the g95 people, after taking a good long vacation to ...
    (comp.lang.fortran)
  • Re: Integer Coersion
    ... and as this is Fortran not Delphi, ... vaguely standard conforming. ... Your compiler supports SIZEOF as do several others including my ... to be other than 8bits when cheap memory came on the scene and BURIED ...
    (comp.lang.fortran)
  • Re: Starting to doubt fortran
    ... that there were absolutely no "clever" tricks. ... time a new version of the vendors C compiler comes out. ... Fortran), it could be reliably depended upon in a portable way. ... That's beyond the standard, but many tend to be so ...
    (comp.lang.fortran)
  • Re: If It Were Easy...
    ... As a practical programmer, I am interested almost exclusively in "dense" pr ... For "dense" problems aliasing appears to be very low obstacle for optimizin ... oop) and you (compiler) have as good information as Fortran. ...
    (comp.arch)