Next: , Previous: , Up: Well-formedness – Functions   [Contents][Index]


11.10.2 Cannot use return outside of function

A 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