Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!husc6!cs.utexas.edu!oakhill!steve From: steve@oakhill.UUCP (steve) Newsgroups: comp.lang.fortran Subject: Re: DO loops, anyone? - Apologies! Summary: Read my lips (or at least my posts) Message-ID: <1922@devsys.oakhill.UUCP> Date: 20 Mar 89 15:04:08 GMT References: <459@orange19.qtp.ufl.edu> <50500107@uxe.cso.uiuc.edu> <16448@mimsy.UUCP> Organization: Motorola Inc. Austin, Tx Lines: 62 In article <16448@mimsy.UUCP>, chris@mimsy.UUCP (Chris Torek) writes: > In article <1919@devsys.oakhill.UUCP> steve@oakhill.UUCP (steve) writes: > >... the problem [of branching into inactive DO-loops, in particular to > >terminating CONTINUE statements] does appear repeatedly in the real > >world. And there is an assumed behavior. > > Not so. The problem does appear; but there are *two* assumed behaviours. > Yours is only one of them. (The other is for the compiler to manufacture > extra labels so that the branch is not into an inactive DO-loop.) It is > not clear which to choose; I say the compiler should reject the code, > unless one of two switches is used, each of which causes the compiler > to run the code at about 1% full speed (by inserting delay loops). > > *That* should get people to fix their code! :-) > > `Well, we *did* say it would run slower if you demanded it work your way' :-) > -- > In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) > Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris I don't know about you, but I am in the business of selling the software I write. I would much like the safe, protected life of theoretical programming. One of the reasons I got into compiler work is I thought it of all computer science fields was the nearest to theory. I have repeated said there are three behaviors. 1) Error out. 2) Act as if there is an implicit CONTINUE at the end for the external loop. 3) Act as if the last statement was in a special class that gets run once every loop interation (external or internal). In the a previous post I told you I tried option one. When the market cried, I had to try something else. I did option 2. I also made it so you had to ask for option 2. Your solution is only making a phyiscal representation of option 2. I always felt that compilers which generated code that it knew should be there (like a CONTINUE in this case) were somewhat odd. If you create the blocks orderly as you are generating this code, there is no need to remind oneself what you mean. (If you want to get me into a discussion on indepth generation of DO loops, I'm game). As for the sugestion of delay loops, well any company that did that would not last in the business long. To tell the buyer that he does not know how to program is not the best way of drumming up business. (If you want to get me into a discussion of what I think is the problems in the software field, I'm game too, but it probably doesn't belong in this group). 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) ----------------------------------------------------------------------------