Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!rutgers!cunixf.cc.columbia.edu!shenkin From: shenkin@cunixf.cc.columbia.edu (Peter S. Shenkin) Newsgroups: comp.lang.fortran Subject: Re: More Style Points -- One Entry, One Exit? Message-ID: <1990Aug6.151938.9351@cunixf.cc.columbia.edu> Date: 6 Aug 90 15:19:38 GMT References: <1990Aug4.011300.17395@nmt.edu> Reply-To: shenkin@cunixf.cc.columbia.edu (Peter S. Shenkin) Organization: Columbia University Lines: 26 In article <1990Aug4.011300.17395@nmt.edu> dbriggs@nrao.edu (Daniel Briggs) writes: >As long as we are discussing style points, here's one I have wondered >about. Why are people SO adamant about the ONE entry, ONE exit point >of view? I grant you that from a CS "proof of correctness" point of >view, it is certainly the most convenient form to analyze. Likewise, >one can create some awful code with indiscriminate use of ENTRY and >RETURN statements. Still are these issues so important from a I interpreted the style guide to prohibit not the appearance of more than one RETURN in a subroutine, but rather to prohibit "RETURN n", transferring control to different places in the calling routine, depending on the value on n. From my point of view, the problem with ENTRY is how complicated it is for a human to analyse what is going on in someone else's code. I accept that there may be smple cases where analysis is easy, but I've learned to shudder whenever I encounter an ENTRY in someone else's code, and I tend to avoid it in my own, largely because I hate to make other people shudder. (Confession: I once used some ENTRY points, and coming back to the code later, I myself shuddered.... That's what really did it for me!) -P. ************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb************************** Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY 10027 (212)854-1418 shenkin@cunixc.cc.columbia.edu(Internet) shenkin@cunixc(Bitnet) ***"In scenic New York... where the third world is only a subway ride away."***