![]() |
|
Navigation |
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.
Examples
rascal>int triple(int n) { return 3 * n; } int (int): int triple(int); rascal>triple(5); int: 15Using return outside a function body gives an error: rascal>return 3;
|stdin:///|(0,9,<1,0>,<1,9>): Return statement outside of function scope
![]() |