Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!sun-barr!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: Oh nooo! (gotos) Message-ID: <7887@goofy.megatest.UUCP> Date: 10 Sep 89 05:51:20 GMT References: <1989Sep8.070123.4416@twwells.com) Organization: Megatest Corporation, San Jose, Ca Lines: 31 From article <1989Sep8.070123.4416@twwells.com), by bill@twwells.com (T. William Wells): ) : while(rule = (Rule*)Queue_iter_next(&rule_iter)) { ) : ) : while(rsym = (Symbol*)Queue_iter_next(&rsym_iter)) { ) : switch (derives(rsym)) { ) : case derives_nothing: ) : goto next_rule; ) : .... ) : } ) : } ) : ) : next_rule: continue; ) : ) : } ) ) Look Ma, no goto! ) ) while(rule = (Rule*)Queue_iter_next(&rule_iter)) { ) while(rsym = (Symbol*)Queue_iter_next(&rsym_iter)) { ) switch (derives(rsym)) { ) case derives_nothing: ) break; ) .... (cases that want to loop use continue) ) } ) break; ) } ) } ) Your mother should know that you removed a goto but added a fatal bug. I would prefer the goto. Ask your Ma.