TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
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