Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: bart Newsgroups: comp.lang.c Subject: Re: do { quit; } else { } Date: Tue, 15 Apr 2025 17:38:40 +0100 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <87a58mqt2o.fsf@nosuchdomain.example.com> <20250413072027.219@kylheku.com> <20250414155907.846@kylheku.com> <_ItLP.2610978$TBhc.1647602@fx16.iad> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 15 Apr 2025 18:38:40 +0200 (CEST) Injection-Info: dont-email.me; posting-host="cec4580467d8bef69918f71b92c931ef"; logging-data="133753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vYWZxcwP/Mu0igWR3gCxh" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:T7dmhwyoPC2eu1zfse5paixtb1w= Content-Language: en-GB In-Reply-To: On 15/04/2025 16:31, Scott Lurndal wrote: > bart writes: >> On 15/04/2025 15:05, Scott Lurndal wrote: > >> >> >> What about this one: >> >> for(i = 0; j < N; k++) > > Any fool can write bad code in any language, including yours. > It is impossible to write such a *FOR* loop in any language that actually implements it properly. C's 'FOR' loop is misnomer for a weird feature that is like 'while' but with three components. A feature where there is virtually no checking so that it can comprise any kind of nonsense. It doesn't have a dedicated feature for iterating a variable over a range.