FORTRAN 1.1 SUNOS 4.0 with 6 patches still buggy !

Richard Maine maine at altair.dfrf.nasa.gov
Fri Jun 23 01:53:42 AEST 1989


In article <3983 at kalliope.rice.edu> ecn!marcel at nluug.nl (Marcel Bernards) writes:

>  We got still trouble with FORTRAN 1.1 with the 6 patches applied.
>  it is a internal read problem with blank chars.
>  It causes to hang up the processor for tty input thats never coming
>  ....
>          READ( string,*,ERR=999 ) number
>  ....
>  Anyone has an idea if this one is a bug or a feature ??
>  one of our programmers encountered this one!!

The above line is "illegal" (non-ANSI) FORTRAN.  ANSI does not allow list
directed internal reads.  Thus the program is buggy.

Of course, its a plausible enough extension to want.  This particular
sample is easy to recode per ANSI, but it can get annoying for more
complicated cases.  Still, it can be done and is worth the bother if you
care at all about portability - or perhaps even if you don't.  Although I
wish this were standard, I suspect that a major reason that it isn't in
the standard is that it poses several complications that ANSI didn't want
to deal with.  When you use extensions like this, you always take the risk
that the vendor just ignored the complications, which is what this looks
like to me.

Having said the above, let me hasten to add that there is no "acceptable"
(to me) justification for the compiler to act like it appears to,
regardless of whether the code is legal or not.  If the compiler does not
intend to support list directed internal reads as an ANSI extension, then
it should give a compilation error.  If it does intend to support them,
then it should deal with complications like this.  Either way, it's a
compiler bug in my book.

--

Richard Maine
maine at elxsi.dfrf.nasa.gov [130.134.1.1]
(Outside mail won't get to altair.dfrf.nasa.gov, so don't bother trying).



More information about the Comp.sys.sun mailing list