🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #1238

Re: Taming The Switch-Statement

#1238
From: Rosario19
Date: Sun, 01 Nov 2026 09:39
20 lines
2457 bytes
On Tue, 13 Oct 2026 21:54:06 -0000 (UTC), Lawrence DÿOliveiro <>
wrote:

>On Tue, 13 Oct 2026 07:23:40 -0000 (UTC), Waldek Hebisch wrote:
>
>> So what those counts indicate: majority of loops is simple, that is
>> have no early exit. Vast majority of early exits is done via
>> 'return'.
>
>My experience in my own C code is quite the opposite. Lots of loops
>have exits in the middle, leading me to use forms like “for (;;)”. I
>also try to avoid putting “return” anywhere other than the end of a
>function, to make it easier to see the flow of control.
>
>*cough* Nassi-Shneiderman diagrams *cough*

my little experience is this
for simple task loop are simple and this is 95% of times 
than there algo need goto label for optimal construction in terms of
speed or number of execution statements
Technical Details
Message-ID: <702eel1084poj39dgkdomrjgtsfeobesvd@4ax.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: <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> <11akm9q$29tpl$1@paganini.bofh.team> <11am99u$ul56$2@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!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Rosario19 <Ros@invalid.invalid>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Sun, 01 Nov 2026 10:39:47 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <702eel1084poj39dgkdomrjgtsfeobesvd@4ax.com>
References: <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> <11akm9q$29tpl$1@paganini.bofh.team> <11am99u$ul56$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 01 Nov 2026 09:31:50 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1944128"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18iKsb8Gbh4nqVYW/umfSULHCv0wi3oiGQ="; posting-host="35da1d5d5686e3d22afe7b844cfd8830"
Cancel-Lock: sha1:18fgp252Mjk/V8XyBNV1f5FJZkI= sha256:3z3bQ9RchmLIbSb35ESf0XtAzCcDAS9iMBOfPGS2jz4=
	sha1:89sXyEupFM0WONLLksJjrKTthqE= sha256:Q/YRU4Cx5koctYkbmYTKvFtOHgXVCsJa8eaKn/tlbbM=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)