Article View: comp.std.c
Article #3401Re: GOTO single exit point (was: Re: How to eliminate GOTO?)
From: James Kanze US/ESC 60/3/141 #407...
Date: Wed, 06 Sep 1995 08:59
Date: Wed, 06 Sep 1995 08:59
23 lines
1997 bytes
1997 bytes
In article <42hmj1$96o@rdsunx.crd.ge.com> volpe@bart.crd.ge.com
(Christopher R. Volpe) writes:
|> >Maybe you misunderstood me. I am _not_ proposing that gotos are a reasonable
|> >alternative to multiple return statements. Both are bad and avoidable.
|> Ah... Ok. So you prefer the umpteen-levels-of-if-statement-nesting method?
I don't pretend to speak for Paul Long, but I prefer the style where
each function does one, and only one, thing. In this case, you don't
get umpteen levels of if statement nesting. Although I personally
prefer the style in which you enter each program block at the top, and
leave it at the bottom, if functions are small enough, it really isn't
that important. (In other words, I would prefer to maintain 10 10
line functions in which the programmer has liberally used return in
the middle of the function, rather than 1 100 line function that
rigorously adheres to the rules of structured programming.)
--
James Kanze Tel.: (+33) 88 14 49 00 email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
-- Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID:
<KANZE.95Sep6105955@slsvhdt.lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!xlink.net!slsv6bt!newsReferences:
<3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge.com> <4258ak$cj7@news0.rain.rg.net> <42hmj1$96o@rdsunx.crd.ge.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c,comp.lang.c Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) Subject: Re: GOTO single exit point (was: Re: How to eliminate GOTO?) In-Reply-To: volpe@bart.crd.ge.com's message of 5 Sep 1995 14:24:33 GMT Message-ID: <KANZE.95Sep6105955@slsvhdt.lts.sel.alcatel.de> Sender: news@lts.sel.alcatel.de Organization: SEL References: <3vn1ht$kj8@martha.utk.edu> <41cke4$gtd@sparcserver.lrz-muenchen.de> <41glno$3a0@caip.rutgers.edu> <41iebe$kec@news0.rain.rg.net> <41pm80$skp@inferno.mpx.com.au> <DE02nC.B58@eskimo.com> <41t0sb$15e@news0.rain.rg.net> <DE6G2z.JJD@crdnns.crd.ge.com> <4258ak$cj7@news0.rain.rg.net> <42hmj1$96o@rdsunx.crd.ge.com> Date: 06 Sep 1995 08:59:53 GMT