Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!ginosko!uunet!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: The final word on GOTO (Don't I wis Message-ID: <6461@ficc.uu.net> Date: 7 Oct 89 06:40:20 GMT References: <6396@ficc.uu.net> <725@thor.wright.EDU> <6430@ficc.uu.net> <4447@buengc.BU.EDU> <867@crdos1.crd.ge.COM> <4462@buengc.BU.EDU> Reply-To: peter@ficc.uu.net (Peter da Silva) Distribution: na Organization: Xenix Support, FICC Lines: 26 In article <4462@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes: > switch(ch = format_char) { > /* Switch body exactly as above */ > } > switch(ch) { /* duplicate switch with just the donum code */ > } I'm not at all sure this is clearer than the goto-full version. You have taken a single logical operation and split it in two parts. If you consider the goto the work of the devil, then of course this represents progress. If you don't, but consider it a rather esoteric tool to be used for unusual circumstances, then it doesn't. Consider that it's now less maintainable, since you have the same set of cases included in two places. What happens if you put in a '%b' format? Now you have two places to add the code for printing in binary. Personally, I find gotos not a lot diffreent from switches and return statements, and a lot less confusing than longjmp. -- Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation. Biz: peter@ficc.uu.net, +1 713 274 5180. Fun: peter@sugar.hackercorp.com. `-_-' "Seems to me that posting an entire RFC in PostScript is like posting a 'U` Sun-3 binary to comp.sources.unix." -- sgrimm@sun.com (Steven Grimm)