Template:example
From cppreference.com
| This section is incomplete Reason: no example |
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.
{{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
codeis 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 totrueto indicate this (Possible output is shown instead of just Output).
| The above documentation is transcluded from Template:source/doc. (edit | history) Subpages of this template. |