Template:Out: Difference between revisions
Content added Content deleted
m (typo) |
m (typo) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1:
<includeonly><div>
;{{#if: {{{1|}}} | {{{1}}} | Output}}{{#if: {{{
This template is used to introduce the output of a programming example.
Line 23:
|-
| <code>1</code>
|
| <code><nowiki>{{out|Return value}}</nowiki></code>
| <div style="white-space:nowrap">{{out|Return value}}</div>
|-
| <code>
| The test-case/condition which produces this output.
| <code><nowiki>{{out|case=test case 3}}</nowiki></code>
| <div style="white-space:nowrap">{{out|case=test case 3}}</div>
|-
| <code>input</code>
| The (single-line) input which produces this output.
| <code><nowiki>{{out|
| <div style="white-space:nowrap">{{out|
|-
| <code>
| A remark to show in parentheses.
| <code><nowiki>{{out|
| <div style="white-space:nowrap">{{out|
|-
| <code>text</code>
| Free-form text to follow instead of a colon.
| <code><nowiki>{{out|text=...}}</nowiki></code>
| <div style="white-space:nowrap">{{out|text=...}}</div>
|}
You can combine multiple parameters, except that <tt>case</tt> and <tt>input</tt> are mutually exclusive.
{{template}}</noinclude>
|
Latest revision as of 10:34, 27 August 2016
This template is used to introduce the output of a programming example.
Usage
Write {{out}}
just above the <pre>...</pre>
block that lists a code example's output.
It also accepts these optional parameters:
Parameter | Purpose | Example | Renders as |
---|---|---|---|
{{out}}
|
| ||
1
|
Text to show instead of the word "Output". | {{out|Return value}}
|
|
case
|
The test-case/condition which produces this output. | {{out|case=test case 3}}
|
|
input
|
The (single-line) input which produces this output. | {{out|input=Hello world}}
|
|
note
|
A remark to show in parentheses. | {{out|note=elided}}
|
|
text
|
Free-form text to follow instead of a colon. | {{out|text=...}}
|
|
You can combine multiple parameters, except that case and input are mutually exclusive.