Part of my code looks like this:

out (result)
{
  if (result==true)
  {
    lots of assertions...
  }
}

I would prefer an early exit like:

out (result)
{
  if (result==false) return;

  lots of assertions...
}

Is this possible somehow (return and break don't do the job...). The only thing I found is using goto, which I prefer over that gigantic if-block, but maybe there is something better, I don't know of?

Reply via email to