Difference between revisions of "Template:Param"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
Line 12: Line 12:
 
Produces: <b>[[Aggregate|int &#91;string&#93;]]&nbsp;</b>{{Pspan|map}}
 
Produces: <b>[[Aggregate|int &#91;string&#93;]]&nbsp;</b>{{Pspan|map}}
 
[[Category:Basic Templates]]
 
[[Category:Basic Templates]]
</noinclude><includeonly>&nbsp;{{#if: {{{ag|}}}|<b>[[Aggregate|{{{1}}}&nbsp;]]</b>|'''[[{{{1}}}]]'''}}&nbsp;{{#if: {{{2|}}}|{{Pspan|{{{2}}}}}&nbsp;}}</includeonly>
+
</noinclude>
 +
<includeonly>&nbsp;{{#if: {{{ag|}}}|<b>{{Lnkstart}}Datatype Constants#Aggregate{{!}}{{{1}}}&nbsp;{{Lnkend}}</b>|'''{{Lnkstart}}Datatype Constants#{{{1}}}{{!}}{{{1}}}{{Lnkend}}'''}}&nbsp;{{#if: {{{2|}}}|{{Pspan|{{{2}}}}}&nbsp;}}</includeonly>

Revision as of 01:08, 13 March 2010

Using Param

This is the template for a parameter; first supplied value is parameter type, second is parameter description.

Note that the second parameter, description, is optional. (If used, it will be displayed with automatic styling via Template:Pspan.)

To specify that the return dataype is an aggregate, supply an additional argument of "ag=SOMETHING" where SOMETHING can be any string at all.

Examples

{{Param|int|count}}

Produces:  int count 

{{Param|string}}

Produces:  string 

{{Param|int [string]|map|ag=t}}

Produces: int [string] map