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 connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vgaf7e$ui7l$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vgaf7e$ui7l$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Bart <bc@freeuk.com>
Newsgroups: comp.lang.c
Subject: Re: else ladders practice
Date: Mon, 4 Nov 2024 12:38:06 +0000
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <vgaf7e$ui7l$1@dont-email.me>
References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org>
 <vg0t3j$2ruor$1@dont-email.me>
 <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org>
 <864j4pv76h.fsf@linuxsc.com> <6726C97C.4080807@grunge.pl>
 <86ldxztzpk.fsf@linuxsc.com> <vgacoi$tr9q$1@dont-email.me>
 <vgaemm$ui29$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 04 Nov 2024 13:38:06 +0100 (CET)
Injection-Info: dont-email.me; posting-host="b7ed5aae7ac33cde2ea3252aa4b29a5d";
	logging-data="1001717"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19J+bL4CkqfxjC+sS3w64uC"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Fx6m+IPd70pNoZcgF8tXCjJOLu8=
In-Reply-To: <vgaemm$ui29$1@dont-email.me>
Content-Language: en-GB
Bytes: 2710

On 04/11/2024 12:29, Janis Papanagnou wrote:
> On 04.11.2024 12:56, Bart wrote:
>> [...]
>>
>> Here, the question was, can:
>>
>>          if (c1) s1;
>>     else if (c2) s2;
>>
>> always be rewritten as:
>>
>>     if (c1) s1;
>>     if (c2) s2;
> 
> Erm, no. The question was even more specific. 

I mean that the question came down to this. After all he had already 
decided on that second form rather than the first, and had acknowledged 
that the 'else's were missing.

That the OP's example contained some clear patterns has already been 
covered (I did so anyway).


>It had (per example)
> not only all ci disjunct but also defined as a linear sequence of
> natural numbers! - In other languages [than "C"] this may be more
> important since [historically] there were specific constructs for
> that case; see e.g. 'switch' definitions in Simula, or the 'case'
> statement of Algol 68, both mapping elements onto an array[1..N];
> labels in the first case, and expressions in the latter case. So
> in "C" we could at least consider using something similar, like,
> say, arrays of function pointers indexed by those 'n'.

That too!

! (Not that
> I'd suggest that by just pointing it out.)
> 
> I'm a bit astonished, BTW, about this huge emphasis on the topic
> "opinions" in later posts of this thread. The OP asked (even in
> the subject) about "practice" which actually invites if not asks
> for providing opinions (besides practical experiences).