Sujet : Re: Checking the loop variable after the loop has ended (Was: Loops (was Re: do { quit; } else { }))
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 25. Apr 2025, 06:50:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vuf7qo$3b0or$1@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
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?
Janis