🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #261

Re: Taming The Switch-Statement

#261
From: Tim Rentsch
Date: Mon, 12 Oct 2026 11:03
22 lines
2542 bytes
Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> bart <bc@freeuk.com> writes:
> [...]
>
>> 'break' to quit a loop early is part of the language, so why shouldn't
>> someone make use it?
>
> Agreed.  (There are coding styles that require loops to exit only at the
> bottom, but that's not what we're talking about.)
>
>> It just its use can be interfered with when 'switch' is involved.
>
> Yes.  Everyone here knows that, and knew it before you started talking
> about it.
>
> Michael S wrote above that "The cases where I want to break out of
> the loop from the switch in the body of the loop are very common."
> Tim Rentsch questioned the "very common" part of that, and asked
> for an example.  [...]

I didn't question it.  I just said it surprised me.
Technical Details
Message-ID: <86ik37i3kl.fsf@linuxsc.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
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> <11ag37o$2ln0a$1@dont-email.me> <11agbsh$2pbk7$1@dont-email.me> <11aggaq$2qqh9$1@dont-email.me> <11agils$2s3tg$1@dont-email.me> <11agv1t$30q22$2@kst.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Mon, 12 Oct 2026 04:03:06 -0700
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <86ik37i3kl.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> <11ag37o$2ln0a$1@dont-email.me> <11agbsh$2pbk7$1@dont-email.me> <11aggaq$2qqh9$1@dont-email.me> <11agils$2s3tg$1@dont-email.me> <11agv1t$30q22$2@kst.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Mon, 12 Oct 2026 11:03:07 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3693692"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+rLafn+dbOR1WSXH67X8VP3itjdt5/Ges="; posting-host="1f2789f15d316c232bd9e49999d71d7c"
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:gFBEDwK3ulutlXCEFapNFrvvS3Y=
	sha1:rCUJyPH7K0YeX4xnUzlClME/es4= sha256:6ceVV/roxJCN6AcBiuCEwqywnZECCSvvNrewb6UdQxk=
	sha1:ss+HzvGYslBxTymPip+RKRg5t2k= sha256:jVJzjlK828htPeMj9r1ZvkyzyZWl8IEwff+dwLR7zCA=