Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Show comment
Hide comment
@dragon1672

dragon1672 Oct 4, 2014

seeing helps

Owner

dragon1672 commented Oct 4, 2014

seeing helps

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