Comment (computer programming): Difference between revisions

Content deleted Content added
m Reverting possible vandalism by 196.189.182.178 to version by Wws. Report False Positive? Thanks, ClueBot NG. (4392538) (Bot)
 
(2 intermediate revisions by one other user not shown)
Line 145:
| publisher=Cambridge University Press
| isbn=978-1-397-80521-8
}}</ref> Examples include [[Javadoc]], [[Ddoc]], [[Doxygen]], [[Visual Expert]] and [[PHPDoc]]. Forms of [[docstring]] are supported by [[Python (programming language)|Python]], [[Lisp (programming language)|Lisp]], [[Elixir (programming language)|Elixir]], and [[Clojure]].<ref>[https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/defn Function definition with docstring in Clojure]</ref> [[C Sharp (programming language)|C#]], [[F Sharp (programming language)|F#]] and [[Visual Basic .NET]] implement a similar feature called "XML Comments" which are read by [[IntelliSense]] from the compiled [[.NET]] assembly.<ref>{{cite book|last=Murach|title=C# 2005|page=56}}</ref>
 
=== Visualization ===
Line 193:
=== Extend language syntax ===
 
Occasionally, code that is formatted as a comment is overloaded to convey additional information to the translator, such as [[conditional comment]]scomments. As such, syntax that generally indicates a comment can actually represent program code; not comment code. Such syntax may be a practical way to maintain compatibility while adding additional functionality, but some regard such a solution as a [[kludge]].<ref>[[c2: HotComments]]</ref>
 
Other examples include interpreter [[Directive (programming)|directives]]:
Line 292:
 
<syntaxhighlight lang="c">
/***************************\**
* *
* This is the comment body. *
* *
\ *****************************/
</syntaxhighlight>