Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcupt1!hpisod2!decot From: decot@hpisod2.HP.COM (Dave Decot) Newsgroups: comp.lang.c Subject: Re: gotos Message-ID: <2550064@hpisod2.HP.COM> Date: 10 Apr 88 06:01:12 GMT References: <1988Apr5.213343.1528@utzoo.uucp> Organization: Hewlett Packard, Cupertino Lines: 22 > For me, the hardest thing to handle is real long blocks. You know, > the things delimited by curly braces: > > > for(; foo = bar; bleep < blap) > { > /* a skillion lines of code omited. */ > } > > It's SO hard to figure out where the darn thing starts and where it ends. > And if their are "breaks" and "continues", yech. When that happens, > in these long blocks, I would prefer a "done:" label at the end and > "gotos" rather than "breaks". That way, I can at least search for the label. > > Maybe we shoud start a raging argument about whether long blocks are > _considered_harmful_. Shouldn't be much argument there. Yes. The solution is not to introduce a label; it is to break up the long blocks into appropriate separate functions. Dave "I use gotos to get fully out of nested loops" Decot hpda!decot