Last active
August 11, 2016 17:52
-
-
Save jeremywrowe/5327507 to your computer and use it in GitHub Desktop.
Bringing goto statements in c back into style.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
=> too legit, too legit, too quit