info-sather
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using "return" values or "out" arguments


From: Duke Normandin
Subject: Using "return" values or "out" arguments
Date: Sun, 4 Mar 2012 14:49:56 -0700

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]