Documentation comments | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Documentation comments

For what are documentation comments used and what are the differences between them and multi-line/single line comments?

23rd Mar 2018, 5:33 PM
Cristina Meda
Cristina Meda - avatar
7 Answers
+ 7
Multi/single line comments are created by the developer/coder, it is used as self documentation, or a quick reminder of what a piece or block of code is for or what it does. Documentation comments are generally created by documentation utilities, but developers can also write comments following the documentation tool format to allow the manual comments be recognized by the tool. Documentation comments use specific formatting used by the utility wizard to build project documentation, usually documentation comments include details of the thing it is documenting, e.g. argument list & type, or return value for documentation of methods, or detailed list of members for classes documentation. https://www.stack.nl/~dimitri/doxygen/manual/docblocks.html Hth, cmiiw
23rd Mar 2018, 6:50 PM
Ipang
+ 3
All comments are helpful
23rd Mar 2018, 7:05 PM
dieserrapha
dieserrapha - avatar
0
first of all it's useful for u, .... with out comments , if u write a code and then come back to it after a year. ..... u probably are gonna say " what the heck I was trying to do here!!!".... and secondly it's useful if u wanna pass ur code to someone else (like a teammate of ur programming group)
23rd Mar 2018, 6:34 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
the only difference is the number of lines
23rd Mar 2018, 6:34 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
and one more thing.... sometimes comments (mostly the ones in a document ) are used as a guide line for writing codes . ( meaning it has been created before getting ur hands on the code)
23rd Mar 2018, 6:38 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
@Rapha. 👍 long story short. ha?!😂
23rd Mar 2018, 7:26 PM
Farshaad Heydari
Farshaad Heydari - avatar
0
Which software or tool is used for preparing software documentation?
20th Sep 2019, 6:03 PM
VK Vandana
VK Vandana - avatar