🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #3856

Re: Wishful thinking: return-parameter

#3856
From: Zefram
Date: Fri, 25 Aug 1995 05:30
36 lines
2295 bytes
<halasz@caip.rutgers.edu> wrote:
>-In article <1995Aug2.080237.17479@dcs.warwick.ac.uk>, A.Main@dcs.warwick.ac.uk (Zefram) writes
[...]
>-                                                In summary, your
>- proposal naturally leads us to totally abandon structured programming,
>- in order to avoid implicit gotos.
>No, this comment means that you need to learn structured programming.

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.

>The main point behind it is the lack of need to search the code for jumps to
>a givven point.  When a loop has one exit, one knows that the condition
>wherefor it lasted is changed, and therefore knows that much at that one point.

I'm afraid I can't parse that second (compound) statement.  Is this GNU
English?  Please post using -ansi -pedantic.  Seriously, I'd have much
less trouble understanding this if it were written in Latin.

(Comment after rereading halasz' paragraph: I translate it as "when a
loop has (exactly) one exit, one knows that the condition that caused
it to continue is no longer true, so one knows that fact at that point
(the loop exit)".  Incorrect spelling of "wherefore" doesn't help any,
and my remark regarding Latin stands.)

>"return" offers nothing at all by wai of such securitie, in C no more than
>"goto".

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.  If you want Pascal, you know where to find
it.

-zefram
Technical Details
Message-ID: <1995Aug25.053038.4883@dcs.warwick.ac.uk>
Path: arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mail
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <1995Aug16.040124.24562@dcs.warwick.ac.uk> <410gpf$9nf@caip.rutgers.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!news.dcs.warwick.ac.uk!not-for-mail
From: A.Main@dcs.warwick.ac.uk (Zefram)
Subject: Re: Wishful thinking: return-parameter
X-Nntp-Posting-Host: stone
Message-ID: <1995Aug25.053038.4883@dcs.warwick.ac.uk>
Sender: news@dcs.warwick.ac.uk (Network News)
Organization: Department of Computer Science, Warwick University, England
References: <3ver2u$8bk@caip.rutgers.edu> <3vg8l8$5sd@myst.plaza.ds.adp.com> <1995Aug16.040124.24562@dcs.warwick.ac.uk> <410gpf$9nf@caip.rutgers.edu>
Date: Fri, 25 Aug 1995 05:30:38 GMT