Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Template:Code"
From NetSec
GertieUbpgdd (Talk | contribs) |
|||
Line 1: | Line 1: | ||
− | {| class="wikitable" width="100%" | + | <onlyinclude>{| class="wikitable" width="100%" |
| | | | ||
{{{text}}} | {{{text}}} | ||
− | |} | + | |}</onlyinclude><noinclude> |
− | <noinclude> | + | |
=Usage= | =Usage= | ||
<pre>{{code | <pre>{{code | ||
Line 46: | Line 46: | ||
}} | }} | ||
+ | [[category:Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 06:32, 2 May 2012
{{{text}}} |
Usage
{{code |text= your code would go here. maybe some here too. }}
Would give you:
your code would go here. maybe some here too. |
If you want the code box to have syntax hilighting, use:
<syntaxhighlight lang=""> or <source lang="">
Example:
{{code |text= <source lang="cpp"> int exampleFunction(int x, int y){ int Sum = x + y; return Sum; } </source> }}
Will give you:
int exampleFunction(int x, int y){ int Sum = x + y; return Sum; } |