Subj : Re: Is well written code a rare species ? To : comp.programming From : CBFalconer Date : Sat Aug 13 2005 06:14 pm Giannis Papadopoulos wrote: > Chris Sonnack wrote: > .... snip ... >> >> My horror story is about the self-described C programmer, who'd >> been at it for many years, and who was surprised when I showed >> him you could 'break' out of a for or while loop..... > > But surely the most interesting is that many people think that > using a 'break' or a 'continue' is bad programming practice... Speaking C, in many cases it is. Especially in bad long-winded code that has not been broken up into sufficiently small modules. At least with a goto the destination is firmly marked, while the introduction of further structure can completely destroy the meaning of break/continue. Apart from a for statement, break/continue are redundant and can always be replaced by a goto. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson .