Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!rice!sun-spots-request From: maine@altair.dfrf.nasa.gov (Richard Maine) Newsgroups: comp.sys.sun Subject: Re: FORTRAN 1.1 SUNOS 4.0 with 6 patches still buggy ! Keywords: SunOS Message-ID: <4090@kalliope.rice.edu> Date: 22 Jun 89 15:53:42 GMT Sender: usenet@rice.edu Organization: Sun-Spots Lines: 37 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 8, Issue 48, message 3 of 19 In article <3983@kalliope.rice.edu> ecn!marcel@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@elxsi.dfrf.nasa.gov [130.134.1.1] (Outside mail won't get to altair.dfrf.nasa.gov, so don't bother trying).