opensubscriber
   Find in this group all groups
 
Unknown more information…

i : info-sather@gnu.org 5 March 2012 • 5:49AM -0500

Using "return" values or "out" arguments
by Duke Normandin

REPLY TO AUTHOR
 
REPLY TO GROUP





In:

http://www.icsi.berkeley.edu/~sather/Documentation/LanguageDescription/webmaker/DescriptionX2Echapter2-1.html#HEADING1-87

it says that Sather forces the use of return values, i.e. something
like the following needs to exist:

blah := some_method() + 4;

Yet, down the page a bit, the "divide" function is declared, and
simply "called" to load up the "div" and "rem" variables.

divide(a,b,out div, out rem);

So, am I to understand that an *out* argument in a function, is a
way to get around *having* to use use an explicit "return"
value/statement? Any benefit to doing this way, rather than
following the Sather "return a value and use it" discipline?

--
Duke





Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.