Next: Cannot use illegal
with imperative statements, Previous: Cannot use otherwise
guard more than once, Up: Well-formedness – Mixing [Contents][Index]
otherwise
guard with non-guard statementsAn otherwise
guard catches the remaining cases for a list of
guards. For that reason it is not allowed combine an otherwise
statement with a non-guard
. So:
interface otherwise_without_guard { in void hello (); in void cruel (); behavior { on hello: {} [otherwise] on cruel: {} } }
This results in the following error message:
otherwise-without-guard.dzn:8:5: error: cannot use otherwise guard with non-guard statements otherwise-without-guard.dzn:7:5: info: non-guard statement here