Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Janis Papanagnou Newsgroups: comp.lang.c Subject: Re: Loops (was Re: do { quit; } else { }) Date: Tue, 22 Apr 2025 00:19:50 +0200 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <20250419092849.652@kylheku.com> <87o6wp1a91.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 22 Apr 2025 00:19:51 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3e165276604fd4caffdc154247e30f50"; logging-data="3324217"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DIqgG068FQPqNPDDsw+at" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:viqM+lb7er1mnaM8v5OVp0Zd4z8= In-Reply-To: Bytes: 2447 On 22.04.2025 00:14, Janis Papanagnou wrote: > On 21.04.2025 23:21, Keith Thompson wrote: > [...] >> >> C-style for loops have been used successfully for decades, and have >> been adopted by other languages (including bash, which isn't >> particularly C-like). > > I have to disagree on that. First I'm positive that Bash adopted > the Ksh loops (but incompletely!), and not the "C" loops. > > And, as opposed to Ksh (and "C"), Bash doesn't support FP valued > loops. Ah, I forgot; but Bash seems to support comma-subexpressions in loops (as opposed to Ksh). - So this is even more valid (given all the inconsistencies and differences across shells and "C"): > (As previously said, Unix shell in general and Bash specifically > is not a good comparison WRT "C" loops.) > > Janis >