Content deleted Content added
Stevebroshar (talk | contribs) →Examples: Merge Ada and Haskell into group section |
Stevebroshar (talk | contribs) →Examples: Merge D into curly brace languages section |
||
Line 344:
===Curly brace languages===
Many of the [[curly brace language]]s such as C, C++ and their many derivatives delimit a line comment with {{code|//}} and a block comment with {{code|/*}} and {{code|*/}}. Originally, C lacked the line comment, but it was added in [[C99]]. Notable languages include: C, C++, [[C# (programming language)|C#]], [[D (programming language)|D]], [[Java (programming language)|Java]], [[Javascript]] and [[Swift (programming language)|Swift]]. For example:
<syntaxhighlight lang="c">
Line 363:
/* This is the nested comment. */
This is the end of the outer comment. */
</syntaxhighlight>▼
====Nested block in D====
D uses C++-style comments with additional syntax for nestable blocks delimited by <code>/+</code> and <code>+/</code>.
<syntaxhighlight lang="d">▼
/*
block comment
*/▼
/+ start of outer block
end of outer block +/
</syntaxhighlight>
Line 599 ⟶ 612:
Hello World<br />
</cfoutput>
▲</syntaxhighlight>
▲<syntaxhighlight lang="d">
▲*/
▲ /+ nested +/
▲ comment +/
</syntaxhighlight>
|