Next: Cannot use statement after recursive call, Previous: Missing return, Up: Well-formedness – Functions [Contents][Index]
return outside of functionA return statement is restricted to function body. So:
interface return_outside_function
{
in void hello ();
behavior
{
on hello: return;
}
}
This results in the following error message:
return-outside-function.dzn:6:15: error: cannot use return outside of
function