Synopsis A return statement occurs outside a function body.
Description A Rascal:Return statement is used to return a value from a function. It is an error to use it outside a function body.
rascal>int triple(int n) { return 3 * n; }
int (int): int triple(int);
int: 15
Using return outside a function body gives an error:
rascal>return 3;
|stdin:///|(0,9,<1,0>,<1,9>): Return statement outside of function scope
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit