Namespaces
Variants
Views
Actions

Template:c/core

From cppreference.com

{{{1}}}

[edit] [{{purge}}] Template documentation

This is one of the templates used for syntax highlighting.

{{c| 1=code| lang=language(optional)}}

Base template that is intended to highlight code inline. lang is optional; value returned by {{get_lang}} is used by default. Applies a semi-transparent dark background.

{{c/core| 1=code| lang=language(optional)}}

Same as {{c}} just no background is applied. Intended to be used in other templates only.

{{cc| 1=code| lang=language(optional)}}

Base template that is intended to highlight larger amounts of code inline. Usually used when the {{c}} template doesn't display the code readable, but {{source}} would waste too much space. lang is optional; value returned by {{get_lang}} is used by default.

{{source| 1=code| lang=language(optional)}}

Base template that is intended to highlight large amounts of code. lang is optional; value returned by {{get_lang}} is used by default.

{{eq fun| lang=language|code1|code2(optional)|...|code4(optional)}} - where code1, code2, etc. are code for each version of the described template function. If no code is supplied at all, the template results in {{todo}}. lang is optional; value returned by {{get_lang}} is used by default.

{{example|description(optional)|lang=language(optional)| code=code_to_display| p=true_if_nondeterministic(optional)}}

Base template for examples. If code is not present, the template results in {{todo}}. lang defaults to a value returned by {{get_lang}}. output specifies the output which is displayed by the code. If the output is not deterministic, p can be set to true to indicate this (Possible output is shown instead of just Output).