void foo(int y) out(val) { ... } body { int val;
... assert(y != 0); return val; }Of course, you'd need to return only at the end of the function for that, but there are ways around that, like inner functions, or perhaps goto end. (Although I don't advocate use of goto.)