Skip to content

Instantly share code, notes, and snippets.

@dragon1672
Last active November 30, 2015 21:24
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dragon1672/f7eac42810d1f2b1b751 to your computer and use it in GitHub Desktop.
If else with comments
void ifElse() {
/*
inactive
//*/ int code; /* only allows one line
inactive
//*/
//--------------------------------------
//*
int code;
//*/ inactive /* only allows one line
int code;
//*/
}
void ifElse() {
/* Chaining!
inactive
/*/
int active
/*/
inactive
/*/
int active
//*/
//--------------------------------------
//* Chaining!
int active
/*/
inactive
/*/
int active
/*/
inactive
//*/
}
void ifElse() {
/* only line change is here
inactive
/*/
int active
//*/
//--------------------------------------
//* only line change is here
int active
/*/
inactive
//*/
}
void finalNotes() {
// using '//*/' will gauntee you can stop the start without the end having errors
//this will stop ANY AND ALL block comments
// the '/*/' trick changes between a beginning of a block to an end
}
//Some cool commenting styles that only require adding/removing one character
void singleBlock() {
//* toggle block (use this line to comment)
int active;
//*/ this line is commented out by the '//'
//--------------------------------------
/* toggle block
int active;
//*/ int code; // line becomes active since the '*/' is seen no the '//'
}
@dragon1672
Copy link
Author

seeing helps

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