Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: C style peeve and knowing the rules Message-ID: <16273@haddock.ima.isc.com> Date: 25 Mar 90 23:21:26 GMT References: <2205@osc.COM> <340018@hplvli.HP.COM> <19356@megaron.cs.arizona.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 13 In article <19356@megaron.cs.arizona.edu> robert@cs.arizona.edu (Robert J. Drabek) writes: >In article <340018@hplvli.HP.COM>, boyne@hplvli.HP.COM (Art Boyne) writes: >>Also, 'while', 'for', 'if', etc., all *require* parenthesis... > >But as Joe Keane said, these constructs require the parenthesis for a >particular reason and few people understand that reason. There's one exception: in the do-while statement, the language definition requires the parentheses even though there would be no syntactic difficulty without them. (The semicolon would suffice to terminate the expression, just as it does with return.) Karl W. Z. Heuer (karl@ima.ima.isc.com or harvard!ima!karl), The Walking Lint)