Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!decwrl!megatest!djones From: djones@megatest.UUCP (Dave Jones) Newsgroups: comp.lang.c Subject: Re: Oh nooo! (gotos) Message-ID: <7917@goofy.megatest.UUCP> Date: 12 Sep 89 18:04:04 GMT References: <1989Sep12.014534.1503@twwells.com) Organization: Megatest Corporation, San Jose, Ca Lines: 47 From article <1989Sep12.014534.1503@twwells.com), by bill@twwells.com (T. William Wells): ) 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? ) DON'T PANIC. Your face is going to be just fine. But it's lucky for me that I don't blush. You didn't misread it. I did. In fact, I read it half a dozen times before I saw the "break" at the end of the while-loop. Boy, that's wierd. No offense, but you won't catch me using this device. Different strokes, I guess. Maybe we should start a debate: "Breaks at end of while-loops... considered harmful?" Oh Nooooooooooooooo!!!