Template:C: Difference between revisions

From The Dreaming
Jump to navigation Jump to search
Template cribbed from Blue Prism (well, I wrote it)
 
m Actually, this should just be a redirect.
 
Line 1: Line 1:
<includeonly><code style="background-color: #f7f7f7; border: 1px dashed #ccf; padding: 2px 3px; color:{{{2|black}}}">{{{1}}}</code></includeonly><noinclude>
#REDIRECT [[Template:Code]]
Template for providing code within a paragraph of a wiki page.
 
== Usage ==
An anonymous first parameter provides the text to wrap into a code element. An optional second parameter can set the colour of the output.
 
== Examples ==
''eg. ''
 
<nowiki> {{code|IsItemInQueue([Queue Name], [Item Key])}}</nowiki>
 
''Gives''
 
{{code|IsItemInQueue([Queue Name], [Item Key])}}
 
----
 
The second parameter sets the colour of the output, ''eg.''
 
<nowiki> {{code|Dim|blue}} {{code|str}} {{code|As}} {{code|String|teal}} {{code|{{=}}}} {{code|"This is a test"|#800}} </nowiki>
 
will emit:
 
{{code|Dim|blue}} {{code|str}} {{code|As|#00f}} {{code|String|teal}} {{code|{{=}}}} {{code|"This is a test"|#800}}
 
Note the use of the {{code|<nowiki>{{=}}</nowiki>}} template to pass a literal '=' character. It is treated as a 'name=value' operator by mediawiki without that.
 
</noinclude>

Latest revision as of 17:43, 25 August 2016

Redirect to: