Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2001 05:04:32 +0200
From:      Roelof Osinga <roelof@nisser.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        Garance A Drosihn <drosih@rpi.edu>, j mckitrick <jcm@FreeBSD-uk.eu.org>, freebsd-questions@FreeBSD.ORG
Subject:   Re: style(9) question
Message-ID:  <3B01EE40.4D2D6534@nisser.com>
References:  <20010515184940.A56109@dogma.freebsd-uk.eu.org> <p05100e0bb727313f1395@[128.113.24.47]> <20010516112824.B35292@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B01EE40.4D2D6534>