Questions about this topic? Sign up to ask in the talk tab.

Difference between revisions of "Template:Code"

From NetSec
Jump to: navigation, search
m (quick formatting fix)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{| class="wikitable"
+
<includeonly>{| class="wikitable" width="100%"
 
|
 
|
 
{{{text}}}
 
{{{text}}}
|}
+
|}</includeonly><noinclude>
<noinclude>
+
 
 
=Usage=
 
=Usage=
{{code
+
Example:
  |text=
+
 
  your code would go here.
+
<pre>{{code
  maybe some here too.
+
|text=
}}
+
<source lang="cpp">
 +
 
 +
int exampleFunction(int x, int y){
 +
int Sum = x + y;
 +
return Sum;
 +
}
 +
 
 +
</source>
 +
}}
 +
</pre>
 +
 
 +
 
 +
Will give you:
 +
 
 +
{{code
 +
|text=
 +
<source lang="c">
 +
int exampleFunction(int x, int y){
 +
int Sum = x + y;
 +
return Sum;
 +
}
 +
</source>
 +
}}
 +
 
 +
[[category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 17:56, 27 June 2016


Usage

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;
}