If else with comments
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
void ifElse() { | |
/* | |
inactive | |
//*/ int code; /* only allows one line | |
inactive | |
//*/ | |
//-------------------------------------- | |
//* | |
int code; | |
//*/ inactive /* only allows one line | |
int code; | |
//*/ | |
} |
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
void ifElse() { | |
/* Chaining! | |
inactive | |
/*/ | |
int active | |
/*/ | |
inactive | |
/*/ | |
int active | |
//*/ | |
//-------------------------------------- | |
//* Chaining! | |
int active | |
/*/ | |
inactive | |
/*/ | |
int active | |
/*/ | |
inactive | |
//*/ | |
} |
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
void ifElse() { | |
/* only line change is here | |
inactive | |
/*/ | |
int active | |
//*/ | |
//-------------------------------------- | |
//* only line change is here | |
int active | |
/*/ | |
inactive | |
//*/ | |
} |
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
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 | |
} |
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
//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 '//' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
seeing helps