Comment (computer programming): Difference between revisions

Content deleted Content added
AppleScript: Add hash syntax
Pascal, Delphi: Mark code text; remove low value detail
Line 715:
====Pascal, Delphi====
 
AsIn [[Pascal (programming language)|Pascal]] and [[Delphi (software)|Delphi]], a block comment is delimited by <code>{</code> and <code>}</code>, and as an alternative, for computers that do not support these characters, '<code>(*&nbsp;...&nbsp;</code> and <code>*)'</code> are allowedalso supported. A line comment is delimited by <code>\\</code>.<ref>{{cite book|author=Kathleen Jensen, Niklaus Wirth|year=1985|title=Pascal User Manual and Report|publisher=Springer-Verlag|isbn=0-387-96048-1}}</ref> In [[Niklaus Wirth]]'s more modern family of languages (including [[Modula-2]] and [[Oberon (programming language)|Oberon]]), comments are delimited by '<code>(*&nbsp;...&nbsp;</code> and <code>*)'</code>.<ref>{{cite book|author=Niklaus Wirth|year=1983|title=Programming in Modula-2|publisher=Springer-Verlag|isbn=0-387-15078-1}}</ref><ref>*{{cite book|author=Martin Reiser, Niklaus Wirth|year=1992|title=Programming in Oberon|publisher=Addison-Wesley|isbn=0-201-56543-9}}</ref> Comments can be nested. // can be included in a {} and {} can be included in a (**). For example:
In [[Pascal (programming language)|Pascal]] and [[Delphi (software)|Delphi]], comments are delimited by '{&nbsp;...&nbsp;}'. Comment lines can also start with '\\' .
As an alternative, for computers that do not support these characters, '(*&nbsp;...&nbsp;*)' are allowed.<ref>{{cite book|author=Kathleen Jensen, Niklaus Wirth|year=1985|title=Pascal User Manual and Report|publisher=Springer-Verlag|isbn=0-387-96048-1}}</ref> In [[Niklaus Wirth]]'s more modern family of languages (including [[Modula-2]] and [[Oberon (programming language)|Oberon]]), comments are delimited by '(*&nbsp;...&nbsp;*)'.<ref>{{cite book|author=Niklaus Wirth|year=1983|title=Programming in Modula-2|publisher=Springer-Verlag|isbn=0-387-15078-1}}</ref><ref>*{{cite book|author=Martin Reiser, Niklaus Wirth|year=1992|title=Programming in Oberon|publisher=Addison-Wesley|isbn=0-201-56543-9}}</ref> Comments can be nested. // can be included in a {} and {} can be included in a (**). For example:
 
<syntaxhighlight lang="pascal">