Difference between revisions of "Template:Param"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This is the template for a parameter; first supplied value is parameter ''type,'' second is parameter ''description.''<br />
+
<h2>Using Param</h2>
Note that the second parameter, ''description'', is optional. If used, it will be displayed styled by [[Template:Pspan]].<br />
+
<p>This is the template for a parameter; first supplied value is parameter ''type,'' second is parameter ''description.''</p>
To specify that the return dataype is an aggregate, supply an additional argument of "ag=SOMETHING" where SOMETHING can be any string at all.
+
<p>Note that the second parameter, ''description'', is optional. If used, it will be displayed styled by [[Template:Pspan]].</p>
 +
<p>To specify that the return dataype is an aggregate, supply an additional argument of "ag=SOMETHING" where SOMETHING can be any string at all.</p>
 +
<h2>Examples</h2>
 +
<pre>{{Param|int|count}}</pre>
 +
Produces: {{Param|int|count}}
 +
<pre>{{Param|string}}</pre>
 +
Produces: {{Param|string}}
 +
<pre>{{Param|int [string]|map|arg=t}}</pre>
 +
Produces: {{Param|int [string]|map|arg=t}}
 
[[Category:Basic Templates]]
 
[[Category:Basic Templates]]
</noinclude><includeonly>&nbsp;{{#if: {{{ag|}}}|'''[[Aggregate|{{{1}}}]]'''|'''[[{{{1}}}]]'''}}&nbsp;{{#if: {{{2|}}}|{{Pspan|{{{2}}}}}&nbsp;}}</includeonly>
+
</noinclude><includeonly>&nbsp;{{#if: {{{ag|}}}|<b>[[Aggregate|{{{1}}}&nbsp;]]</b>|'''[[{{{1}}}]]'''}}&nbsp;{{#if: {{{2|}}}|{{Pspan|{{{2}}}}}&nbsp;}}</includeonly>

Revision as of 15:09, 28 February 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 styled by 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|arg=t}}

Produces:  [[int [string]]] map