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


11.6.1 Declarative statement expected

If a compound statement starts with a declarative statement, all other statements must be declarative statements.

interface mixing_declarative
{
  in void hello ();
  behavior
  {
    [true]
    {
      on hello: {}
      if (true);
    }
  }
}

This results in the following error messages:

mixing-declarative.dzn:9:7: error: declarative statement expected
mixing-declarative.dzn:9:7: error: if outside on
mixing-declarative.dzn:9:16: error: imperative compound outside on