Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: comp.lang.c Subject: Re: Oh nooo! (gotos) Message-ID: <1989Sep12.014534.1503@twwells.com> Date: 12 Sep 89 01:45:34 GMT References: <1989Sep8.070123.4416@twwells.com) <7887@goofy.megatest.UUCP> Organization: None, Ft. Lauderdale, FL Lines: 35 In article <7887@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: : 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; : ) : } : ) : ) 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; : ) } : ) } : ) : : you removed a goto but added a : fatal bug. I would prefer the goto. Well yeah, so would I. But what is the bug? I've just reread the code and don't see where I've broken it. I'm prepared to be red-faced because this has go to be something really obvious, but what? --- Bill { uunet | novavax | ankh | sunvice } !twwells!bill bill@twwells.com