cc – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation)
 
(Remove codecomment dependency, Add Category:cc template usage error categorisation)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span style="color: #00F; font-style: italic;"><nowiki>//</nowiki>&nbsp;{{{1}}}</span></includeonly><noinclude>__NOTOC__
<includeonly><span class="code-comment">//&nbsp;{{Trim|{{{1|-no comment defined-{{TemplateCase||[[Category:cc template usage error]]}}}}}}}</span></includeonly><noinclude>{{Doc/Template
Displays a code comment.
|descr= Displays a one-lined code comment. See {{Template|codecomment}} for multi-lines comments. It also adds the page to the [[:Category:cc template usage error|cc template usage error]] category on usage error.


== Usage ==
|param1= message
<nowiki>{{cc|code comment to display}}</nowiki>
|descr1= comment to display


== Result ==
|example1= <nowiki>{{cc}}</nowiki>
{{cc|test}}
|result1= {{cc}}


== Source ==
|example2= <nowiki>{{cc|this code is wonderful}}</nowiki>
<syntaxhighlight lang="html">
|result2= {{cc|this code is wonderful}}
<span style="color: #00F; font-style: italic;">//&nbsp;{{{1}}}</span></syntaxhighlight>


== See also ==
|example3= <div style="white-space: pre"><nowiki>{{cc|this
* [[Template:codecomment]]
code
</noinclude>
is
wonderful}}</nowiki></div>
|result3= {{cc|this
code
is
wonderful}}
}}</noinclude>

Latest revision as of 14:56, 30 June 2022

Displays a one-lined code comment. See {{codecomment}} for multi-lines comments. It also adds the page to the cc template usage error category on usage error.

This template is used on these pages.

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