🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3415

Re: GOTO single exit point (was: Re: How to eliminate GOTO?)

#3415
From: Peter Curran
Date: Sun, 10 Sep 1995 13:19
32 lines
2012 bytes
On 10 Sep 1995 04:38:50 GMT in article <42tq4q$7qt@rdsunx.crd.ge.com>
    volpe@bart.crd.ge.com (Christopher R. Volpe) (Christopher R.
Volpe) wrote:

>In article <42s5su$4h8@inforamp.net>, pcurran@inforamp.net (Peter Curran) writes:
>>
>>Since I got myself into this, here's a solution:
>>
>[elided]
>>
>>I'm not sure that this is exactly how I'd write this in a real-world
>>situation, but it does the job without multiple returns and without
>>deep nesting.

>Not bad. It does continue with unnecessary processing even after one of
>the variables was found to be NULL, but I prefer it over the multiple
>indentations.

Just to be clear, the only extra processing is evaluating some extra
conditions - the effect of the code is the same as the original, I
think.  I'm not concerned about that, unless some performance analysis
can demonstrate it has a detectable effect.

>Of course, I still prefer the immediate return best :-)

So you're a fool :-) :-) :-) :-)
(That's the appropriate response at this point in a flame war,
according to standard netiquette, isn't it?)


--
Peter Curran                               pcurran@inforamp.net
Technical Details
Message-ID: <42uo2k$hrf@inforamp.net>
Path: arc1-ca.pugleaf.net!inforamp.net!usenet
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> <42l7s7$2id@news0.rain.rg.net> <42n1t0$18q@rdsunx.crd.ge.com> <42s5su$4h8@inforamp.net> <42tq4q$7qt@rdsunx.crd.ge.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!inforamp.net!usenet
From: pcurran@inforamp.net (Peter Curran)
Newsgroups: comp.std.c,comp.lang.c
Subject: Re: GOTO single exit point (was: Re: How to eliminate GOTO?)
Date: Sun, 10 Sep 1995 13:19:18 GMT
Organization: PSC Enterprises
Message-ID: <42uo2k$hrf@inforamp.net>
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> <42l7s7$2id@news0.rain.rg.net> <42n1t0$18q@rdsunx.crd.ge.com> <42s5su$4h8@inforamp.net> <42tq4q$7qt@rdsunx.crd.ge.com>
Reply-To: pcurran@inforamp.net
NNTP-Posting-Host: ts3-09.inforamp.net
X-Newsreader: Forte Free Agent 1.0.82