Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch
Newsgroups: comp.lang.c
Subject: Re: Whaddaya think?
Date: Tue, 18 Jun 2024 00:19:28 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <86msnik9a7.fsf@linuxsc.com>
References: <666ded36$0$958$882e4bbb@reader.netnews.com> <87ed8x4zjl.fsf@nosuchdomain.example.com> <666f10b7$0$1412896$882e4bbb@reader.netnews.com> <20240617003207.452@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Tue, 18 Jun 2024 09:19:29 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="d4aeba7b4aaab0d94b94221c1561c3e8";
logging-data="1308441"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/LohsyW70MITsWcvcar92U0wEO48rUT/Y="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:D47KHbk9A2/YSciSS97LvfWnXJM=
sha1:i9w50hfd4tBoUc4cgNlzd/BKY9A=
Bytes: 1585
Kaz Kylheku <643-408-1753@kylheku.com> writes:
> Speaking of while, the do/while construct does not require parentheses
> in order to disambiguate anything, since it has a mandatory semicolon.
> Yet, it still has them.
It has them to allow an extension for a "loop-and-a-half" control
structure:
do statement while ( expression ) statement
and so for example
do c = getchar(); while( c != EOF ) n++;
to count characters on standard input.