🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #368

Re: Taming The Switch-Statement

#368
From: Keith Thompson
Date: Wed, 14 Oct 2026 01:34
27 lines
3157 bytes
Michael S <already5chosen@yahoo.com> writes:
[...]
> In this particular case Ritchie did not have to innovate in order to
> create this feature. Quite opposite, as others (Keith ?) mentioned, he
> had to innovate in order to merge distinct break-loop and break-switch
> features of ancestor language into unified break.

As Dan Cross pointed out, I didn't quite get this right.  At the time
C was invented, BCPL didn't have ENDCASE.  BCPL continued to evolve
independently after B and C were derived from it.

This information is from Ritchie's HOPL (History or Programming
Languages) paper, available at
https://www.nokia.com/bell-labs/about/dennis-m-ritchie/chist.html

    Not every difference between the BCPL language documented in
    Richards's book [Richards 79] and B was deliberate; we started
    from an earlier version of BCPL [Richards 67]. For example,
    the endcase that escapes from a BCPL switchon statement was
    not present in the language when we learned it in the 1960s,
    and so the overloading of the break keyword to escape from the
    B and C switch statement owes to divergent evolution rather
    than conscious change.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID: <11amm6k$12efg$2@kst.eternal-september.org>
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!kst.eternal-september.org!.POSTED!not-for-mail
References: <119qf6l$2rmg3$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> <20261012220256.00003d07@yahoo.com> <11ajb95$3t8jj$1@dont-email.me> <20261012223144.00000f95@yahoo.com> <86zewhhdep.fsf@linuxsc.com> <20261013225449.00005562@yahoo.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!kst.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Tue, 13 Oct 2026 18:34:12 -0700
Organization: None to speak of
Lines: 27
Message-ID: <11amm6k$12efg$2@kst.eternal-september.org>
References: <119qf6l$2rmg3$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>
	<20261012220256.00003d07@yahoo.com> <11ajb95$3t8jj$1@dont-email.me>
	<20261012223144.00000f95@yahoo.com> <86zewhhdep.fsf@linuxsc.com>
	<20261013225449.00005562@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 14 Oct 2026 01:34:13 +0000 (UTC)
Injection-Info: kst.eternal-september.org;
	logging-data="1128944"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+rE419Bb2lGiEFEDUbQ18D"; posting-host="8bc08a5e85dad83e60fe86919d5c20fb"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:PYo4JM+Q/oGExV8oDx9cqcvyUE0= sha256:EFRsEheU7Lptk5M9xrsMA5djN9lw/BhE5aMjwiRmu4c=
	sha1:F3NnqlxMyxVBbBcvZvCHv9bvRyY= sha256:+WrKEISQ2k5gbYQ7HIr6GZU4SzgwA9MnfpYMIdXVerI=