Template:Code

The template provides a replacement for placing code inside

This template also avoids the troublesome excessive line length that can result from the traditional Wiki method of showing code by adding a space in front of a line thus:

this is going to become far too long...

Although part of the line length saving comes from a smaller character spacing, the text does wrap, so this template is not appropriate if the code you are representing depends on unbroken lines.

NOTE: This template should be used only for code, formulas, regular expressions and closely related content. Other templates are available for other uses, see Category:Templates.''

Usage of Template:Code:

text to be formatted

For example, typing this: $c: // (-%7)

will cause the following to be displayed:

$c: // (-%7)

Breaks and spaces: This template is a left-indented HTML table, so:
 * text will automatically wrap round to the next line when it reaches the end of the line.
 * if you want to force a break in the text, use  in preference, because entering a carriage return may give variable results. A carriage return will enforce a new paragraph, so give a greater space between lines than , but further down the table you may need to use two carriage returns to force a new paragraph.
 * more than one space in the text will be ignored, so use the &amp;nbsp; entity to force an extra space between characters.

IMPORTANT NOTE: Wiki parsing issues mean that using some symbols inside a template "call" might cause your intended code to not display properly. The equals sign (=) is a known offender. If you have problems, enclose the text part of the call inside    tags. For example, to display this:

$c = (%7) + (%4)

you need to type this:

$c = (%7) + (%4)

or alternatively if an equals sign is the problem, type "1=" (without quotes) after the pipe:

$c = (%7) + (%4)

Using Template:Code in bulleted or ordered lists:

Optionally you can use:

instead of Template:Code when inserting code in lists. Using the codelist template, the code will be indented a little further into the body of the page.

Ignore the following, it's only a representation of formatting and a parameter dummy.