Deutsch English Français Italiano |
<87msnizhmr.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!feed.opticnetworks.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson <Keith.S.Thompson+u@gmail.com> Newsgroups: comp.lang.c Subject: Re: Whaddaya think? Date: Tue, 18 Jun 2024 03:10:04 -0700 Organization: None to speak of Lines: 24 Message-ID: <87msnizhmr.fsf@nosuchdomain.example.com> References: <666ded36$0$958$882e4bbb@reader.netnews.com> <87ed8x4zjl.fsf@nosuchdomain.example.com> <666f10b7$0$1412896$882e4bbb@reader.netnews.com> <v4o7om$er18$1@dont-email.me> <20240617003207.452@kylheku.com> <86msnik9a7.fsf@linuxsc.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 18 Jun 2024 12:10:05 +0200 (CEST) Injection-Info: dont-email.me; posting-host="aed299878570cb32e21d076f9aa05b90"; logging-data="1370673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Hidz+LyxWiXJXdInXMEB4" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:l04DoZtdZvK7OL6bzgwPZ/ZvKBU= sha1:5ZEdufE6HNiJEwZVMp3LVTRM7L4= Bytes: 1961 Tim Rentsch <tr.17687@z991.linuxsc.com> writes: > 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. Oh? Do you have any evidence that that was the intent? Does any compiler provide such an extension? (As you know it's a syntax error in standard C.) -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */