| |||||||||
In computer programming, comments are a part of code which is used to explain the code; such comments are generally ignored by compilers and executions. Some programming tools can read structured information in comments in order to generate documentation automatically. Examples include the javadoc program, designed to be used with the Java programming language.
(the word "comment" is used here, as an example of a comment):
comment comment;
REM comment
/* comment */
/* comment */
// comment
/* comment */
/* comment */
// comment
/+ comment +/
$! comment
C comment
<!-- comment -->
{ comment }
# comment
# comment
// comment
/* comment */
/* comment */
' comment
// comment
rem comment
% comment
@c comment
@comment comment
' comment
(* comment *)
If there are two markers delimiting the word comment, then they should be included at the beginning and end of the comment. If there is one, it begins at the start of the comment character(s) and ends at the end of the line.
(This is from the fork.c file from the Linux kernel source)
(from perlbug.PL in the standard perl distribution)
(from the BambooWeb PHP script)
(from the Sun Microsystems javadoc documentation; the comment is designed to be read by the javadoc processor)