Deutsch   English   Français   Italiano  
<vuf8m5$3bk45$1@dont-email.me>

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

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Richard Harnden <richard.nospam@gmail.invalid>
Newsgroups: comp.lang.c
Subject: Re: Checking the loop variable after the loop has ended (Was: Loops
 (was Re: do { quit; } else { }))
Date: Fri, 25 Apr 2025 07:04:53 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <vuf8m5$3bk45$1@dont-email.me>
References: <vspbjh$8dvd$1@dont-email.me>
 <87ikn3zg18.fsf@nosuchdomain.example.com> <vtqnv9$hf83$1@dont-email.me>
 <87fri68w2c.fsf@nosuchdomain.example.com> <vtrrdi$1smfe$1@news.xmission.com>
 <vtrvc6$mjoi$1@dont-email.me> <vttpqo$38nt7$1@dont-email.me>
 <2a8l0k1ecs2j3rihhen4kjvdr6udb7785d@4ax.com> <vuf7qo$3b0or$1@dont-email.me>
Reply-To: nospam.harnden@invalid.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 25 Apr 2025 08:04:54 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="4d2a2a6659aefc338d7e9d664450d8b9";
	logging-data="3526789"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+IeVHt9qU3VE/KXzf0BB2y+9itL8arBqg="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:y5zW2RS4z6LPHfhGomKJvCB76WI=
Content-Language: en-GB
In-Reply-To: <vuf7qo$3b0or$1@dont-email.me>

On 25/04/2025 06:50, Janis Papanagnou wrote:
> On 24.04.2025 22:43, Rosario19 wrote:
>> On Fri, 18 Apr 2025 16:07:03 +0100, bart wrote:
>>
>>>>     for (n = NUM_ENTRIES; (n >= 0) && (node[n] != key); --n) continue;
>>
>> using goto label would be as this
>>
>>       n=NUM_ENTRIES
>> L:   if(!((n >= 0) && (node[n] != key))) goto Ex
>>       --n; goto L;
>> Ex:
>>
> 
> You are just showing a low-level transformation of a higher-level
> construct. (I'm sure the professional folks here are familiar with
> such transformations.)
> 
> You are not [seriously] suggesting to use that 'goto' based form
> instead of the 'for' loop, do you?
> 

That's exactly the kind of thing that should be considered harmful.