Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site opus.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!seismo!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.lang.c Subject: Re: return expr and Decus-C Message-ID: <475@opus.UUCP> Date: Tue, 15-May-84 21:49:42 EDT Article-I.D.: opus.475 Posted: Tue May 15 21:49:42 1984 Date-Received: Fri, 18-May-84 07:25:26 EDT References: <478@decvax.UUCP>, <1514@brl-vgr.ARPA> <853@druxm.UUCP> Organization: NBI, Boulder Lines: 20 >> return expr; >> is preferable to >> return(expr); >> since the latter looks like a function call (which it is not). > >By this reasoning, we should use "while expr" instead of "while (expr)", >and "if expr" instead of "if (expr)". And don't forget "switch expr" to >replace "switch (expr)". Seems like a good idea to me. (Put down that torch! Not for C, but for another language.) After all, Pascal manages without the parens around the expr's in "if", "while", and "case" (Pascal analog of "switch"). Of course, some Pascalers are amazed that C doesn't have "then" to go with "if". (It's a little trickier to get rid of BOTH the parens around the expr in the "if" AND the "then" keyword - but it's possible. Look at the way Icon handles comparable situations.) -- ...A friend of the devil is a friend of mine. Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303) 444-5710 x3086