From owner-freebsd-questions Tue May 15 20: 6:20 2001 Delivered-To: freebsd-questions@freebsd.org Received: from nisser.com (c0039.upc-c.chello.nl [212.187.0.39]) by hub.freebsd.org (Postfix) with ESMTP id 2AB8537B422 for ; Tue, 15 May 2001 20:06:17 -0700 (PDT) (envelope-from roelof@nisser.com) Received: from nisser.com (roelof [10.0.0.2]) by nisser.com (8.9.3/8.9.2) with ESMTP id FAA99267; Wed, 16 May 2001 05:04:32 +0200 (CEST) (envelope-from roelof@nisser.com) Message-ID: <3B01EE40.4D2D6534@nisser.com> Date: Wed, 16 May 2001 05:04:32 +0200 From: Roelof Osinga Organization: eBOA - Programming the Web X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: Greg Lehey Cc: Garance A Drosihn , j mckitrick , freebsd-questions@FreeBSD.ORG Subject: Re: style(9) question References: <20010515184940.A56109@dogma.freebsd-uk.eu.org> <20010516112824.B35292@wantadilla.lemis.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey wrote: > > On Tuesday, 15 May 2001 at 15:17:54 -0400, Garance A Drosihn wrote: > > At 6:49 PM +0100 5/15/01, j mckitrick wrote: > >> Why does style(9) put parentheses around return values? > > > > Apparently, some very early versions of C required this. > > Specifically, versions before about 1973. > > So why do we still do it? I don't know. Brian W. Kernighan and Dennis M. Ritchie, The C Programming Language 1978 (!) published by Prentice Hall Software Series. [note. This book was set in Times Roman and Courier 12 by the authors using a Graphic Systems phototypesetter driven by a PDP-11/70 running under the UNIX operating system. So why is it weird when I ask how to get (g|t)roff to generate PS A4, eh?] In Chapter 4 on page 68 they tell us: The /return/ statement is the mechanism for returning a value from the called function to its caller. Any expression can follow /return/: /return (|expression|)/ where / denotes courier font and | italics. So why? Because ``THEY'' sayd so in 1978! ;) Roelof PS you can't trust anyone these days ;) PPS the () is the highest priority primary-expression operator and as such is typed. Mind you, this part gets reasonably obfuscated :) -- _______________________________________________________________________ eBOAź est. 1982 http://eBOA.com/ tel. +31-58-2123014 mailto:info@eBOA.com?subject=Information_request fax. +31-58-2160293 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message