Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!chiba!khb From: khb%chiba@Sun.COM (Keith Bierman - Sun Tactical Engineering) Newsgroups: comp.lang.fortran Subject: Re: Dubious Fortran Construct (Was: An exercise in futility) Keywords: DO LOOP ambiguous Message-ID: <83567@sun.uucp> Date: 4 Jan 89 01:22:42 GMT References: <583@mbph.UUCP> <1762@devsys.oakhill.UUCP> Sender: news@sun.uucp Reply-To: khb@sun.UUCP (Keith Bierman - Sun Tactical Engineering) Organization: Sun Microsystems, Mountain View Lines: 84 In article <1762@devsys.oakhill.UUCP> steve@oakhill.UUCP (steve) writes: >In article <583@mbph.UUCP>, > bad code repeated (yet again) >I think you now understand the reason I posted the example. This >case was so ambigous that there were three correct responses, and a >large portion of machines generated wrong responses. As several people posted, (even w/o recourse to the offical x3j3 response) the code is not compliant with the standard. This is NOT AMBIGOUS it is simply wrong code. >If you remember >my initial post, I said there should be an unambigous interpretation >for this code, and I gave four choices to decide on. These were: > >1) Code is illegal. This interpretaion is what some people in the > ANSI committee probably want. Unfortunately I think the standard > on this point is to vague. Also it flies in the face of common > coding practice. I have been involved in many end-user projects over 10 years, and have only seen this construct a couple of times...and it was the source of WRONG RESULTS in all cases. (otherwise I would not have been reading that module!). The fact that it works on some machines is totally irrelevant. > >In my concurrent postings, I state there needs to be a way to input >user desires to the standard committees. The net might be one such source. The current way is to write to x3j3. An address you may use is Jeanne Adams, Chair X3J3, Scientific Compting Division, NCAR, Box 3000, Boulder, Colorado 80307. The net is wonderful, and you can submit suggestions to any committee member by email. >So let's discuss. I personally believe that choice #3 is best. It allows >for current user practice (or some say misunderstanding) of FORTRAN while ------------------------- Please post a survey of some large codes (covering say 2 million lines) and tell us what % of the code contains this construct. I have several million lines under my belt, and have seen it twice, and it was wrong in both cases. >clearing out the ambiguity. I also think this would be what most users >intend when they code like this. Since I put a CONTINUE on every label, >I technically avoid this ambiguity. I personally believe #1 is out of the >question. The job of a standards committee should be to define standard >use and expand it unobstructively as new theory as structures arise. >Since this structure seems to be in standard use, saying it is illegal >oversteps what I think a standards committee should do. What do you >folks think. The standard said it is wrong. Compiler writers chose to not look for possible errors, but allow their algorithms to do whatever seems best. If you would like a compiler to not allow ANYTHING that is not in the standard, start using Ada. Your theory is good, please find an example which is relevant. The f88 document has several such (namelist, better definition of end=, etc.). Of course, this would be evidence that the current systems works the way you suggest a future organization should. > > enough from this mooncalf - Steven >---------------------------------------------------------------------------- >These opinions aren't necessarily Motorola's or Remora's - but I'd like to >think we share some common views. >---------------------------------------------------------------------------- >Steven R Weintraub cs.utexas.edu!oakhill!devsys!steve >Motorola Inc. Austin, Texas >(512) 440-3023 (office) (512) 453-6953 (home) >---------------------------------------------------------------------------- Keith H. Bierman It's Not My Fault ---- I Voted for Bill & Opus