+ 7
comments specific - best commenting techniques
i found a = 3 //tells what a is b = 5 // tells what b is to be conducive to good understanding as opposed to the popular style of //comment a = 3 //comment b = 5 feel free to post commenting tips
6 Respostas
+ 8
Use comments to insert ASCII art into your source file. :D
+ 8
lol @hatsy another great idea !
+ 5
for short statements, variables it's good to use 1st method but when using long comments i believe the 2nd style is better.
https://code.sololearn.com/cmgxEW2VFEK8/?ref=app
+ 5
oh long comments yes
but long comments use
/**/
+ 5
ah @james tedious but what a nice idea !
+ 5
//for long comments two lines or less. I use a single line comment this way.
/* for bigger comments which span more than 3 lines its better to use multi line comments but does not matter much both work just fine and have not much issues
PS: I hardly write comments bigger than 2 lines . I use this only for commenting big functions, code snippets a little blurb that's all. i have a preference for using
single line comments for convenience sake"// #
*/