🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3886

Re: Wishful thinking: return-parameter

#3886
From: halasz
Date: Mon, 28 Aug 1995 22:56
21 lines
1559 bytes
In article <1995Aug25.053038.4883@dcs.warwick.ac.uk>, A.Main@dcs.warwick.ac.uk (Zefram) writes:
+ ....
+ That's a bit rich.  Having used C since some time before there was an
+ ANSI standard, and used other structured programming languages -- as
+ well as some unstructured languages -- before and since that time, I
+ can safely say that I know whereof I speak.
(my sharp comment for your sharp comment).

+ I think I see what you're getting at.  return offers an escape from
+ structured flow control, as does goto.  As do break and continue, and
+ switch to a lesser extent.
The order of lessenind evil is "goto", "return", ... "break"/"continue".
As for "switch", it is not at all such an escape if thus restricted: if
there is code between case-labels, then the last statement is "break".
Nor is "break", if so uzed as aforesaid or it is the one exit from the
loop (the condition is "while (1)" or the like).

+ If you want Pascal, you know where to find it.
Be like that, insistent that good features from other languages not enter C
(except that naming the return-parameter the same as the function is _not_
good idea).
Technical Details
Message-ID: <41thic$49p@caip.rutgers.edu>
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <1995Aug25.053038.4883@dcs.warwick.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail
From: halasz@caip.rutgers.edu
Newsgroups: comp.std.c
Subject: Re: Wishful thinking: return-parameter
Date: 28 Aug 1995 18:56:12 -0400
Organization: Rutgers University
Message-ID: <41thic$49p@caip.rutgers.edu>
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <1995Aug25.053038.4883@dcs.warwick.ac.uk>
NNTP-Posting-Host: caip.rutgers.edu