Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!oakhill!steve From: steve@oakhill.UUCP (steve) Newsgroups: comp.lang.fortran Subject: Re: DO loops, anyone? - Apologies! Summary: No apology is needed from me. Message-ID: <1919@devsys.oakhill.UUCP> Date: 19 Mar 89 17:16:01 GMT References: <459@orange19.qtp.ufl.edu> <50500107@uxe.cso.uiuc.edu> Organization: Motorola Inc. Austin, Tx Lines: 49 In article <50500107@uxe.cso.uiuc.edu>, hirchert@uxe.cso.uiuc.edu writes: > > Steven R Weintraub (steve@oakhill.UUCP) writes: > > >As I stated in my previous post. There is NO problem with the code as > >posted. It is not ambiguous. The problem is that the compiler, in > >order to prevent any posssible ambiguity, generates bad code. > > As I stated in MY previous post, there is a big problem with the code as > posted -- it doesn't conform to X3.9-1978, the ANSI FORTRAN standard. Just > because a compiler doesn't extend FORTRAN in the way you want it to (even if > the extension you want is reasonable) doesn't mean the compiler is generating > "bad code". > > Kurt W. Hirchert hirchert@ncsa.uiuc.edu > National Center for Supercomputing Applications If you read my articles, you will see I repeatedly state this is officially illegal. You claim that since this code is illegal whatever the customer gets, he deserves. Since there is no definition, there is no defined behavior. Theoretically you are right. But, the problem does appear repeatedly in the real world. And there is an assumed behavior. The behavior is that these two do loops act concurrently, that the jump to the terminating statement increments the last active loop and goes through the next loop cycle. The question arises on what to do if the terminating statement is exectuable, which is what started this line of discussion originally (Actually this hiccup was started because of bad code generated). The assumed behavior does not include creating an infinitie loop, causing the internal loop to run if it was to be skipped, or executing the last statement twice. And if you generate something that does any of these, it is wrong. enough from this mooncalf - Steven ---------------------------------------------------------------------------- To flame someone for bad spelling or grammer is a discouragement to net discussion in a timely fashion. ---------------------------------------------------------------------------- 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) ----------------------------------------------------------------------------