Skip to content

Instantly share code, notes, and snippets.

@jeremywrowe
Last active August 11, 2016 17:52
Show Gist options
  • Save jeremywrowe/5327507 to your computer and use it in GitHub Desktop.
Save jeremywrowe/5327507 to your computer and use it in GitHub Desktop.
Bringing goto statements in c back into style.
#include <stdlib.h>
#include <stdio.h>
#define too goto
int main( int argc, const char* argv[]) {
int times;
times = 0;
legit:
printf(" too legit,");
if(times > 0) { too quit; }
else { ++times; too legit;}
quit:
printf(" too quit\n");
exit(0);
}
@jeremywrowe
Copy link
Author

jeremywrowe commented Apr 6, 2013

=> too legit, too legit, too quit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment