🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #122

Re: Taming The Switch-Statement

#122
From: Michael S
Date: Sat, 10 Oct 2026 19:29
30 lines
2350 bytes
On Sat, 10 Oct 2026 19:03:59 -0000 (UTC)
cross@spitfire.i.gajendra.net (Dan Cross) wrote:

> In article <20261010220212.000063fd@yahoo.com>,
> Michael S  <already5chosen@yahoo.com> wrote:
> >On Sat, 10 Oct 2026 20:08:20 +0200
> >Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> >  
> >> On 2026-10-10 15:11, bart wrote:  
> >> > 
> >> > Well, Algol 68 doesn't even have 'break'. For unusual
> >> > control-flow it needs goto.    
> >> 
> >> Yes. - And while "C" has 'goto' as well it also supports 'break'
> >> for some purposes; e.g. as a loop-exit, so it makes sense to reuse
> >> that keyword for other purposes as in 'switch' where it's been
> >> useful. 
> >
> >After practicing C programming for more than 35 years I am deeply
> >convinced that reuse of the same 'break' keyword for loops and for
> >switch was a mistake. But then again, DRM did not have a benefit
> >of hindsight.  
> 
> Perhaps you mean "DMR", aka, Dennis Ritchie.
> 
> 	- Dan C.
> 

Yes, thank you.
Technical Details
Message-ID: <20261010222949.00002c96@yahoo.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> <11addhr$1oakb$1@dont-email.me> <11aduuk$cjlv$1@dont-email.me> <20261010220212.000063fd@yahoo.com> <11ae26v$obj$1@reader2.panix.com>

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: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Sat, 10 Oct 2026 22:29:49 +0300
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <20261010222949.00002c96@yahoo.com>
References: <119qf6l$2rmg3$1@dont-email.me>
	<11addhr$1oakb$1@dont-email.me>
	<11aduuk$cjlv$1@dont-email.me>
	<20261010220212.000063fd@yahoo.com>
	<11ae26v$obj$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 10 Oct 2026 19:29:59 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1971962"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/TYKPXLbjbTmDAoCBzVj0AzBo5nCqThv4="; posting-host="49690832da79aa746ce4261de989d20e"
Cancel-Lock: sha1:M9r4sv8wORGiM1HaEsn/0K1l6BY= sha256:PzL6hOZSvVGWYxMcUQtz4dvb/uQr0o3AZtEGjCpYnW0=
	sha1:4PJUXlPpG/RL7EopBoLsL1Teqgg= sha256:gFw84KwztV/DJtgEaURu7CLht1Hf/RIP6dwwKpdj6VU=
X-Newsreader: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-w64-mingw32)