Skip to content

Instantly share code, notes, and snippets.

@tripleee
Created June 3, 2016 10:34
Show Gist options
  • Save tripleee/671951e2bec504f2177d9a12dfa8aa62 to your computer and use it in GitHub Desktop.
Save tripleee/671951e2bec504f2177d9a12dfa8aa62 to your computer and use it in GitHub Desktop.
// Consecutive, leave early on validation failure
// ... assuming abort(); leaves the current block (function, or even program)
if (function1(param) == 1)
abort();
// else
dostuff1();
if (function2(param) == 2)
abort();
// else
dostuff2();
if (function3(param) == 14)
abort();
// else
dostuff3();
if (function4(param) == 9)
abort();
// else
dostuff4();
if (function5(param) == 7)
abort();
// else
dostuff5();
domorestuff();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment