Created
June 29, 2012 18:37
-
-
Save bstrie/3019889 to your computer and use it in GitHub Desktop.
Togglable comment blocks
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
/* | |
To comment and uncomment any code in here requires one to separately | |
add/remove both the start and end tags for the block comment, which can be a | |
bit annoying if you're toggling a block frequently, or if the start and end | |
points are far apart (and you're using Notepad, or something). | |
*/ | |
/* | |
This is code that is commented out. The second block-comment-start tag, | |
below, is ignored as part of the comment (but only if the language does *not* | |
support nested comments). | |
/**/ | |
//* | |
This is the same code as above, but no longer commented out. The only | |
difference is the single slash before the opening tag, causing it to be | |
commented out and leaving the line below as a legal construction. Thus by | |
adding and removing that single slash, one can "toggle" a block of code in | |
the absence of editor support. | |
/**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment