Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!oakhill!steve From: steve@oakhill.UUCP (steve) Newsgroups: comp.lang.fortran Subject: Re: DO loops, anyone? Summary: I wish it was true. Message-ID: <1916@devsys.oakhill.UUCP> Date: 18 Mar 89 23:44:20 GMT References: <28506@sgi.SGI.COM> <1320@uw-entropy.ms.washington.edu> <94640@sun.Eng.Sun.COM> Organization: Motorola Inc. Austin, Tx Lines: 63 In article <94640@sun.Eng.Sun.COM>, khb@fatcity.Sun.COM (fatcity) writes: > In article <1913@devsys.oakhill.UUCP> steve@oakhill.UUCP (steve) writes: > > >> compilers to produce code that catches this error, at least as an option. > >> ..................... > > > >There are two problems in this code. > > > > 1) It is illegal > > 2) People want to do it. > > > >The ANSI standard, as much as they and we would perfer otherwise, do not > >live in the real world. They have ordained this code as illegal. > >But the real world wants to do this. > > Until 2 years ago (a bit less actually) I was part of the real world. > I never had any trouble explaining why I was fixing someones code to > remove this (relatively RARE, in well tested codes) problem. > > The key "problem" was that compiler writers allowed it to work on some > machine somewhere. Had compiler writers not made the mistake of > ignoring the X3J3 directive, we would not be having this discussion. > > People want to do it, only because it exists in some programs. The > correct thing to do (in the best of all possible worlds) is what Lahey > does. Don't allow it. Tell the customer to fix the code. > > Please DO NOT ALTER COMPILERS to start allowing this. Anyone who sells > compilers should STOP ALLOWING it. > > We can't solve the worlds problems, but this one does have a solution. I wish this was true. On the compiler I wrote we had a complete prohibition of block jumps. Unfortunatly the people we wish to sell it to wanted to block jump. Not just in this case, but into the middle of if-then blocks. We were fighting for a limited area market. Since the competing compiler suppied this ability, it was add the feature or give the competition a step above us. To tell the customer to improve the code might be the ideal thing to do, unfortunately it does not make good business sense to tell the customer he doesn't know how to code. And if you are trying for a sell it might get the door slammed in your face. I am unhappy that I had to sell out to the market on this point, but I'm realistic enough not to become cynical about it. The compiler does at least give a warning that this code is non-ANSI standard and generate a proper do loop. The people who support this feature wrongly in order to speed up their compiler turn my stomach (I guess I'm not realistic enough to accept this). 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) ----------------------------------------------------------------------------