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


11.6.6 Cannot use illegal in if-statement

In an interface, a trigger can only be declared illegal in a direct way. This is due to the declarative character of interfaces. To be more specific, it must not occur in an if. An example:

interface interface_if_illegal
{
  in void hello ();
  behavior
  {
    bool b = false;
    on hello:
    {
      if (b)
        illegal;
    }
  }
}

This results in the following error message:

interface-if-illegal.dzn:10:9: error: cannot use illegal in if-statement