Difference between revisions of "Template:param/doc"

(documenting)
 
m (Examples)
Line 17: Line 17:
 
: With this optionally change the text to be displayed in the link.
 
: With this optionally change the text to be displayed in the link.
 
: This is useful for translations, when the page name would be, for example, [[Source (Português)]], we can display it as [[Source (Português)|Source]].
 
: This is useful for translations, when the page name would be, for example, [[Source (Português)]], we can display it as [[Source (Português)|Source]].
 +
 +
== Exaxmples ==
 +
<pre>{{param|AlignMode|align|Text Alignment}}</pre>
 +
{{param|AlignMode|align|Text Alignment}}
 +
 +
<pre>{{param|AlignMode_(Português)|alinhamento|Alinhamento do texto|ModoDeAlinhar}}</pre>
 +
{{param|AlignMode_(Português)|alinhamento|Alinhamento do texto|ModoDeAlinhar}}

Revision as of 01:49, 11 March 2019

This template is used to explain the arguments and returns of a function. Usually preceded by an usage example of said function.

Usage

{{param|Page name|argument or return name|description|optional display page name}}

Parameters

1
The name of the page describing the type of the argument/return. This will be a link to that page.
2
The name of the argument/return, as used in the preceding function usage exemple.
3
A description of the argument/return.
4
With this optionally change the text to be displayed in the link.
This is useful for translations, when the page name would be, for example, Source (Português), we can display it as Source.

Exaxmples

{{param|AlignMode|align|Text Alignment}}
AlignMode align
Text Alignment
{{param|AlignMode_(Português)|alinhamento|Alinhamento do texto|ModoDeAlinhar}}
ModoDeAlinhar alinhamento
Alinhamento do texto