Content deleted Content added
Stevebroshar (talk | contribs) →Examples: Merge D into curly brace languages section |
Stevebroshar (talk | contribs) →Curly brace languages: Eliminate subsection |
||
Line 357:
</syntaxhighlight>
Some languages, including D and Swift, allow blocks to be nested while other do not, including C and C++.
An example of nested blocks in D:
<syntaxhighlight lang="swift">▼
/* This is the start of the outer comment.▼
/* This is the nested comment. */▼
This is the end of the outer comment. */▼
</syntaxhighlight>▼
<syntaxhighlight lang="d">
Line 376 ⟶ 369:
/+ inner block +/
end of outer block +/
▲</syntaxhighlight>
An example of nested blocks in Swift:
▲<syntaxhighlight lang="swift">
▲/* This is the start of the outer comment.
▲ /* This is the nested comment. */
▲This is the end of the outer comment. */
</syntaxhighlight>
|