Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: Unnecessary parenthesis Message-ID: <5162@haddock.ISC.COM> Date: 14 Jul 88 20:10:18 GMT References: <326@marob.MASA.COM> <2550075@hpisod2.HP.COM> <5253@ihlpf.ATT.COM> <11925@ism780c.isc.com> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <11925@ism780c.isc.com> marv@ism780.UUCP (Marvin Rubenstein) writes: |In article <5253@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704a-Liber,N.J.) writes: |>Since 'return' can return an expression, parentheses are always allowed |>(but never required). | |This is not quite right. A procedure may return a void expression. But |parantheses may NOT enclose a void experssion. Thus statement: | return (); |is [syntactically] malformed. This is not quite right either. The empty string does not denote a void expression. A void function may not return a void expression, either with or without the parens: "void f() { return exit(0); }" violates a constraint. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint