Re: Returns vs. retrieves?

Subject: Re: Returns vs. retrieves?
From: Richard Mateosian <xrm -at- EMAIL -dot- MSN -dot- COM>
Date: Sat, 12 Dec 1998 10:19:32 -0800

>If Richard Mateosian is monitoring the thread, he can probably
>provide details

I wasn't, but my name jumped out at me.


>"returns" is more correct programmer-speak.

No doubt about that.


>The word originates in the old BASIC programming construct of
"GOSUB" (go to the following subroutine) and RETURN; it may
>have even earlier roots in programming.

In BASIC (1967), as in Algol (1958) and in earlier assembly
languages, RETURN refers simply to a transfer of control back to a
marked place in the control stream. For example, in the original
Kemeny & Kurtz BASIC, the RETURN statement causes control to pass to
the statement following the last GOSUB.

Those languages separate argument passing from transfer of control.
In BASIC, for example, the main program and the subroutine
communicate through global variables.

FORTRAN (1956), however, has named arguments, but the RETURN
statement doesn't enter formally into argument passing. Those
speaking about FORTRAN, however, use the term, as in

A subprogram defines a function or a subroutine. They differ in
that a function returns a single value . . . a subroutine usually
performs a more complicated task, returning several results . . .
-- Fortran 90 Explained (Oxford, 1990, ISBN 0-19-853772-7)

In C (1970) the return statement actually contains an argument, as
in

return(p);

In that case we say that the subprogram containing the above return
statement "returns p." ...RM


Richard Mateosian <srm -at- cyberpass -dot- net> www.cyberpass.net/~srm/
Review Editor, IEEE Micro Berkeley, CA

© Copyright 1998. All rights reserved.


From ??? -at- ??? Sun Jan 00 00:00:00 0000=



Previous by Author: Designing large scale websites
Next by Author: Re: E-Commerce
Previous by Thread: Returns vs. retrieves?
Next by Thread: Dumbing it down... not!


What this post helpful? Share it with friends and colleagues:


Sponsored Ads