expression represents the expression to be returned
Description:
The keyword return allows for returning the (evaluated) expression
expression at the end of a begin-end-block ({}-block) used as a
Sollya procedure body. See proc for further details concerning
Sollya procedure definitions.
Statements for returning expressions using return are only possible
at the end of a begin-end-block used as a Sollya procedure
body. Only one return statement can be given per begin-end-block.
If at the end of a procedure definition using proc no return
statement is given, a returnvoid statement is implicitly
added. Procedures, i.e. procedure objects, when printed out in Sollya
defined with an implicit returnvoid statement are displayed with
this statement explicitly given.
Example 1:
> succ = proc(n) { var res; res := n + 1; return res; };
> succ(5);
6
> succ;
proc(n)
{
var res;
res := (n) + (1);
return res;
}