Article View: comp.lang.c
Article #109Re: Taming The Switch-Statement
From: Johann 'Myrkraverk' Oskarsson
Date: Sat, 10 Oct 2026 13:34
Date: Sat, 10 Oct 2026 13:34
26 lines
2573 bytes
2573 bytes
On 10/10/2026 9:11 PM, bart wrote: > because C was crazy enough to fall through to the else block unless > 'break' was added! > > I guess everyone would still defend that choice (because for one person > in a million it will be valuable feature). But it is CLEARLY wrong. It's been some years, so my memory is hazy, but the original C.P.L. language "specification" or manual had all case: examples with an ex- plicit return. I'm not even sure they had thought through exactly how the semantics were meant to work, when they figured they couldn't make a compiler after all. Then BCPL happened -- IIRC it happened before they had a working CPL compiler -- and I expect that one had the fall through we're used to, but bear in mind if you look at the most recent manual that it's not the same compiler that predates B, and the rest is history. You can of course ask Martin Richards, and maybe he still remembers if the C.P.L. people had something else in mind. Good luck. -- Johann | email: invalid -> com | http://www.myrkraverk.com/blog/ I'm not from the Internet, I just work there. | via Easynews.com https://bsky.app/profile/myrkraverk.bsky.social | for ( ;; ) _:; Federated at https://fed.brid.gy/bsky/myrkraverk.bsky.social
Technical Details
Message-ID:
<n9ryS.11350$Nbkf.9077@fx03.ams4>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news-out.netnews.com!s1-3.netnews.com!peer03.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx03.ams4.POSTED!not-for-mailReferences:
<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>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!news-out.netnews.com!s1-3.netnews.com!peer03.iad!feed-me.highwinds-media.com!peer04.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!fx03.ams4.POSTED!not-for-mail MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Taming The Switch-Statement Newsgroups: comp.lang.c 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> Content-Language: en-US From: Johann 'Myrkraverk' Oskarsson <johann@myrkraverk.invalid> Organization: Watcom Pro Ltd. In-Reply-To: <11addhr$1oakb$1@dont-email.me> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Lines: 26 Message-ID: <n9ryS.11350$Nbkf.9077@fx03.ams4> X-Complaints-To: abuse@easynews.com X-Complaints-Info: Please be sure to forward a copy of ALL headers otherwise we will be unable to process your complaint properly. Date: Sat, 10 Oct 2026 21:34:10 +0800 X-Received-Bytes: 2304