Article View: comp.lang.c
Article #1237Re: Taming The Switch-Statement
From: Rosario19
Date: Sun, 01 Nov 2026 09:34
Date: Sun, 01 Nov 2026 09:34
37 lines
2376 bytes
2376 bytes
On Sun, 01 Nov 2026 10:13:44 +0100, Rosario19 wrote:
>I think for(;;) loop is good because one clear see where are the
>initialization part of variable of the loop, the instruction that
>break the loop, the change ciclical of variables of the loop
>
>If not so, it is easy emulate the loop in this way
>
> Inizializations
>Label: Increment or change varaibles of the loop
> Instruction for exit the loop
> Instructions
> goto label;
>
>It due my ignorance of C, I not see all these problem on all this
>LoopName for me is easy that is a label
>the position of label is inside the {}
>as
>
>for(Ini();f();Inc())
>{LoopName:
> ...
> if(cond) break LoopName; // would mean just if(cond) goto LoopName;
>}
I not reach the meaning of break...
so could be this
>for(Ini();f();Inc())
>{
goto L1;
LoopName: break;
L1:
> ...
> if(cond) break LoopName; // would mean just if(cond) goto LoopName;
>}
Technical Details
Message-ID:
<4m1eeltprjm6p71j490d1sf2bsin6h1dvf@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-mailReferences:
<119qf6l$2rmg3$1@dont-email.me> <11b2eck$3pvd9$1@dont-email.me> <20261018171339.00005308@yahoo.com> <11b2pq5$3pvda$7@dont-email.me> <11b3gkj$mt2$1@reader2.panix.com> <11b3m1r$3tp6p$1@paganini.bofh.team> <0gvdell6lp924u0h8qt3aulubc89tfndfl@4ax.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: Rosario19 <Ros@invalid.invalid> Newsgroups: comp.lang.c Subject: Re: Taming The Switch-Statement Date: Sun, 01 Nov 2026 10:34:01 +0100 Organization: A noiseless patient Spider Lines: 37 Message-ID: <4m1eeltprjm6p71j490d1sf2bsin6h1dvf@4ax.com> References: <119qf6l$2rmg3$1@dont-email.me> <11b2eck$3pvd9$1@dont-email.me> <20261018171339.00005308@yahoo.com> <11b2pq5$3pvda$7@dont-email.me> <11b3gkj$mt2$1@reader2.panix.com> <11b3m1r$3tp6p$1@paganini.bofh.team> <0gvdell6lp924u0h8qt3aulubc89tfndfl@4ax.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Date: Sun, 01 Nov 2026 09:26:04 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1944128"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/v8vhSEPmRGJO4Nime4/cSgGHjdhXGmQ0="; posting-host="35da1d5d5686e3d22afe7b844cfd8830" Cancel-Lock: sha1:xzzUegOQqtbSFIAMv0cMHJ5euFo= sha256:baAC0W9qqxjlQKirCQ4gyN4tGkGBrpVasqUQU0GoTMU= sha1:33Ii7rAHWFPdrXikdfPk5p1L1g8= sha256:6bnJbiFH9qDZes10p5zHOGirWnx099Wf4oMch/tjles= X-Newsreader: Forte Free Agent 1.93/32.576 English (American)