🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3585

Re: Wishful thinking: return-parameter

#3585
From: mfinney
Date: Mon, 31 Jul 1995 22:06
18 lines
1158 bytes
In <HBF.95Jul31111739@durin.uio.no>, h.b.furuseth@usit.uio.no (Hallvard B Furuseth) writes:
>Check out GNU G++, Info node "(gcc)Named Return Values in C++".  This:
>
>	int foo(int i) return a = i*i
>	{
> 	    if (i < 0)
>		return i-a;
>	    a++;
>	}

Interesting, I was not aware of the GNU implementation.  It occurred to me
that I had omitted the initializer in my last post.  The only thing that I
don't like about the GNU version is the "return" keyword.  It is redundant,
does not especially make the code easier to read, and is therefore (to me)
annoying.  Also, of course, falling off the end is then allowed because a
default return value is available.

Michael Lee Finney
Technical Details
Message-ID: <3vjk54$k65@mujibur.inmind.com>
Path: arc1-ca.pugleaf.net!mujibur.inmind.com!usenet
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <HBF.95Jul31111739@durin.uio.no>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!mujibur.inmind.com!usenet
From: mfinney@inmind.com
Newsgroups: comp.std.c
Subject: Re: Wishful thinking: return-parameter
Date: 31 Jul 1995 22:06:28 GMT
Organization: In Mind, Inc.
Message-ID: <3vjk54$k65@mujibur.inmind.com>
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <HBF.95Jul31111739@durin.uio.no>
Reply-To: mfinney@inmind.com
NNTP-Posting-Host: finneyman.inmind.com
X-Newsreader: IBM NewsReader/2 v1.2