Template:MacroFunction

From RPTools Wiki
Jump to navigation Jump to search

Template Usage

You should always write the description as though the words "This function..." are automatically supplied by the template.

Refer to Help:Editing for more detailed documentation.

Example

{{MacroFunction
|name=exampleFunction
|proposed=true
|deprecated=
[[newFunction|newFunction()]]
|trusted=true
|version=1.3b50
|compatibility=1.3b52
|description=
This is an example function.  It doesn't actually exist as a function in MapTool.
If you put a bulleted list here, don't end the description with the list.
MediaWiki encloses this parameter inside a DIV block and it will put the close
DIV tag inside the last LI.  For this reason, you may see description
parameters whose values contain a bulleted list followed by a line
that contains only, " "
{{__TOC__}}
|usage=
<source lang="mtmacro" line>
exampleFunction(param1, param2)
</source>

|example=
This example doesn't really do anything.
<source lang="mtmacro" line>
[h: exampleVariable = "a,b,c"]
[r: exampleFunction(exampleVariable, reverse)]
</source>
Returns:
<source lang="mtmacro" line>
c,b,a
</source>

|also=
[[linkToRelatedArticle|Display Name of Related Article]]

|changes=
* '''1.3b52''' - Added reverse parameter.
}}

Source

{{{name}}}() Function

Usage

{{{usage}}}