Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Tim Rentsch Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Sun, 11 Oct 2026 06:13:19 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <86zewkidn4.fsf@linuxsc.com> References: <119qf6l$2rmg3$1@dont-email.me> <11ac0mi$19kfd$1@dont-email.me> <11ac2jv$1a84t$1@dont-email.me> <11ac783$1bkuo$1@kst.eternal-september.org> <11ad5eq$1l8hg$1@dont-email.me> <11ad9fg$cjm0$4@dont-email.me> <11addhr$1oakb$1@dont-email.me> <11aduuk$cjlv$1@dont-email.me> <20261010220212.000063fd@yahoo.com> <11ae56o$cjlv$4@dont-email.me> <20261010230355.00005189@yahoo.com> <864iesjx6e.fsf@linuxsc.com> <11afvqt$2kloc$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 11 Oct 2026 13:13:22 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2795544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++AHGh5D7WFaO6c6nWgxvPCnSvEKbi/oI="; posting-host="1098c1f1b6b0f5d684612506fbd55361" User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux) Cancel-Lock: sha1:D0mEFb3xzBOYnjIdDQB/0SZzJo8= sha1:dc8Bgh0yJ+Psn0+fUd9V6alkQ9Q= sha256:vfQ+Teife5Vozk0u3s+taLFat6YKqQxG+krAvfgHfaM= sha1:skdGBoRn7/8cDX1LoGgeTnOLae0= sha256:P55xYidZKCp0B2EPwGTh6W85RnE234RcBAmS/otbf0c= Xref: csiph.com comp.lang.c:402979 bart writes: > On 11/10/2026 12:26, Tim Rentsch wrote: > >> Michael S writes: >> >>> The cases where I want to break out of the loop from the switch in >>> the body of the loop are very common. >> >> That surprises me. Can you post a representative example (and >> ideally not overly long)? > > An example shouldn't be necessary. It is enough to know that > loop-breaks exist and are used. It doesn't surprise me that they exist. What surprises me is that they are common, in code written by someone I consider a competent programmer. I don't care about what idiotic things are done by people who aren't competent programmers. You might want to think about the deeper meaning of that last sentence.