cc – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Rollback to split single-line and multi-line comment)
m (Fix template page format and add newline removal)
Line 1: Line 1:
<includeonly><span style="color: #00F; font-style: italic;"><nowiki>//</nowiki>&nbsp;{{{1}}}</span></includeonly><noinclude>__NOTOC__
<includeonly>{{Color|blue|''<nowiki>//</nowiki>&nbsp;{{#replace:{{Trim|{{{1|-no comment defined-}}}}}|<nowiki/>
<nowiki/>|<nowiki/> <nowiki/>}}''}}</includeonly><noinclude>__NOTOC__
Displays a one-lined code comment.
Displays a one-lined code comment.


== Usage ==
== Usage ==
<nowiki>{{cc|code comment to display}}</nowiki>
{{<nowiki/>cc|'''''message'''''}}
* message: comment to display


== Result ==
{| class="wikitable"
{{cc|test}}
|+ Examples
 
! Code
== Source ==
! Result
<syntaxhighlight lang="html">
|-
<span style="color: #00F; font-style: italic;">//&nbsp;{{{1}}}</span></syntaxhighlight>
| <nowiki>{{cc}}</nowiki>
| {{cc}}
|-
| <nowiki>{{cc|this code is wonderful}}</nowiki>
| {{cc|this code is wonderful}}
|-
| style="white-space: pre" | <nowiki>{{cc|this
code
is
wonderful}}</nowiki>
| {{cc|this
code
is
wonderful}}
|}


== See also ==
== See also ==

Revision as of 16:19, 4 December 2020

Displays a one-lined code comment.

Usage

{{cc|message}}

  • message: comment to display
Examples
Code Result
{{cc}} // -no comment defined-
{{cc|this code is wonderful}} // this code is wonderful
{{cc|this code is wonderful}} // this code is wonderful

See also