Deutsch   English   Français   Italiano  
<78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org>

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

Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: fir <fir@grunge.pl>
Newsgroups: comp.lang.c
Subject: Re: else ladders practice
Date: Fri, 01 Nov 2024 12:32:30 +0100
Organization: i2pn2 (i2pn.org)
Message-ID: <78eabb4054783e30968ae5ffafd6b4ff2e5a5f17@i2pn2.org>
References: <3deb64c5b0ee344acd9fbaea1002baf7302c1e8f@i2pn2.org> <vg0t3j$2ruor$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 1 Nov 2024 11:32:09 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="441319"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="+ydHcGjgSeBt3Wz3WTfKefUptpAWaXduqfw5xdfsuS0";
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
In-Reply-To: <vg0t3j$2ruor$1@dont-email.me>
X-Spam-Checker-Version: SpamAssassin 4.0.0
Bytes: 1954
Lines: 21

Bart wrote:
> ral clear patterns here: you're testing the same variable 'n' against
> several mutually exclusive alternatives, which also happen to be
> consecutive values.
>
> C is short of ways to express this, if you want to keep those
> 'somethings' as inline code (otherwise arrays of function pointers or
> even label pointers could be use

so in short this groupo seem to have no conclusion but is tolerant foir 
various approaches as it seems

imo the else latder is like most proper but i dont lkie it optically,
swich case i also dont like (use as far i i remember never in my code,
for years dont use even one)

so i persnally would use bare ifs and maybe elses ocasionally
(and switch should be mended but its fully not clear how,

as to those pointer tables im not sure but im like measurad it onece and 
it was (not sure as to thsi as i dont remember exactly) slow maybe 
dependant on architecture so its noth wort of use (if i remember correctly)