Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!uakari.primate.wisc.edu!ginosko!uunet!sunquest!ggg From: ggg@sunquest.UUCP (Guy Greenwald) Newsgroups: comp.lang.c Subject: Re: The final word on GOTO (Don't I wis Summary: no one will win this argument Message-ID: <566@sunquest.UUCP> Date: 12 Oct 89 19:22:35 GMT References: <20324@<1989Sep14| <225800222@uxe.cso.uiuc.edu| <4208@cbnewsh.ATT.COM| <6490@ficc.uu.net| Distribution: na Organization: Sunquest Information Systems, Tucson Lines: 40 In article <6490@ficc.uu.net|, peter@ficc.uu.net (Peter da Silva) writes: | The referenced article discusses replacing the Goto with a subroutine call. | The question is raised... why would that reduce clarity? | | In a block-structured language it wouldn't. In C, however, there is the | problem of local variables. | | Really: | case whatever: | special-code...; | goto common; | | Is a lot clearer than: | case whatever: | special-code...; | common(a, whole, bunch, of, random, arguments); | break; | -- | Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation | Quote: Structured Programming is a discipline -- not a straitjacket. If the arguments are really random, how can the function work? They can't just be chosen at random. As to their number, it depends on how many arguments the function needs. Regarding local variables, you know very well that C can have external variables. I think that no one is going to win this argument against you because you're going to come up with contrived rebuttals no matter what anyone says. If goto's have a place in C, you haven't made a "case" for them. /* Really: */ case whatever: special-code...; goto common; /* Is no clearer than: */ case whatever: special-code...; common(); break; --G. Guy Greenwald II