🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #394

Re: Taming The Switch-Statement

#394
From: bart
Date: Wed, 14 Oct 2026 17:51
30 lines
2292 bytes
On 14/10/2026 13:38, Dan Cross wrote:
> In article <11anobe$1dt0e$1@dont-email.me>, bart  <bc@freeuk.com> wrote:

> Yes, I am aware that you will tell me that it is justified
> because that problem is actually the one worth solving, and the
> others are not; you needn't bother.  Simply put, I disagree that
> that one problem is sufficiently important to warrant its own
> solution, particularly when something more general is already
> known and available in the language (labeled break/continue).

I missed this bit.

Is labeled break now available in C?

If so, how would it be used here:


    while (1) {
        switch (x) {
        case y:
            Break;

where that Break is meant to quit the loop.

Remember that if DMR hadn't made that screw-up in 1972 it would simply 
have been as it is above with his choice of keyword in place of Break.

But I would be interested in trying out the new feature.

Technical Details
Message-ID: <11aoff0$1n82v$1@dont-email.me>
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> <11amecs$10eab$1@dont-email.me> <11amune$ipi$1@reader2.panix.com> <11anobe$1dt0e$1@dont-email.me> <11ant3u$6o$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: bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Wed, 14 Oct 2026 18:51:28 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <11aoff0$1n82v$1@dont-email.me>
References: <119qf6l$2rmg3$1@dont-email.me> <11amecs$10eab$1@dont-email.me>
 <11amune$ipi$1@reader2.panix.com> <11anobe$1dt0e$1@dont-email.me>
 <11ant3u$6o$1@reader2.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 14 Oct 2026 17:51:29 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1810527"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/XPVAL9RZvpLVn+RblycYq"; posting-host="c3ad536068e45f6b2a132b7865af71ef"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:nxgOUcSJsSVTSyV0UUckblFOhA0= sha256:sk/yohJZwD43KEl2U5hEbsuMlZm66OVDtzSo1Do20gM=
	sha1:kIyT4VGuyN7om5BuWV06JM96iUk= sha256:WYFwPf8GPkBVEWAtm0Ii1pkmVM0ZWPRMdsMOd1zBI8M=
In-Reply-To: <11ant3u$6o$1@reader2.panix.com>
Content-Language: en-GB