Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connectionsPath: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Rosario19
Newsgroups: comp.lang.c
Subject: Re: Loops (was Re: do { quit; } else { })
Date: Thu, 24 Apr 2025 22:35:48 +0200
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <667l0ktngvq0eea99lb7s855gviev02tf7@4ax.com>
References: <20250413072027.219@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Injection-Date: Thu, 24 Apr 2025 22:35:47 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d6cba1b9af80eac05eca5e0a140a8a48";
logging-data="2495903"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19AvxbEIMWZEXw7/Qy7wMsdduSg34QmhCI="
Cancel-Lock: sha1:Pj92RFqnFyS2mOvpxE9neMzVZvA=
X-Newsreader: Forte Free Agent 1.93/32.576 English (American)
On Fri, 18 Apr 2025 16:57:24 +0200, Janis Papanagnou wrote:
>On 16.04.2025 11:45, Rosario19 wrote:
>> On Tue, 15 Apr 2025 09:25:40 +0200, Janis Papanagnou wrote:
>>=20
>>> On 15.04.2025 06:57, Rosario19 wrote:
>>>>>>> On 13.04.2025 18:39, bart wrote:
>>>>>>>> [...]
>>>>>>>>
>>>>>>>> for(let i =3D 1; i <=3D 36; i++) {
>>>>
>>>> C for loop is great, but all can be workarounded with goto label
>>>
>>> Sure. Or all done with Turing machines. - But why would one want to.
>>=20
>> because one not has the for loop, because is need more flexibility in
>> what code has to make, because one find so easy goto label, that it is
>> easier of the loop for, even if i think in 80% of cases for loop is
>> less chars and easier of the loop that use goto label
>
>(Note my question above was rhetorical. - Turing machine programs is
>not something you should consider as scale for what we usually do in
>programming.)
>
>Of course, if all you have is an assembler language then "all" you
>have are jumps.=20
>(Note: again an accentuated formulation of the point,
>but I'm confident you understand what I'm trying to say.)
>
>If, for common loop conditions, it's easier for someone to use gotos
>than to use typical loop constructs then I suggest that this person
>should not apply for a programmers' job.
for loop is easy because propose always the same type of loop, the
initialization, the condition, the increment etc all ok but sometimes
one need to exit the loop before the main condition of exit, and go
down or up in the code lines going out of that loop,
for these cases it is better for me, not use forloop but the right
if()s goto labels...
>The "number of characters" in a syntactical construct is IMO not the
>most relevant or primary factor. But abstractions in languages often
>coincide with much terser formulations. And abstractions is what aids
>in programming non-trivial systems. I would abstain from gotos, but
>because of the "number of characters" to type or to spare.
>
>Janis