Template:Flink: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>StDoodle mNo edit summary |
||
Line 3: | Line 3: | ||
<p>This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.</p> | <p>This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.</p> | ||
<p>This template requires ''at least'' two (unnamed) parameters to be passed; the first is the dataype returned by the function; the second is the name of the function (''without'' parenthesis).</p> | <p>This template requires ''at least'' two (unnamed) parameters to be passed; the first is the dataype returned by the function; the second is the name of the function (''without'' parenthesis).</p> | ||
<p>All additional unnamed parameters will be parsed as datatypes, in order, of the | <p>All additional unnamed parameters will be parsed as datatypes, in order, of the useable parameters. (Up to 8 can be supplied.)</p> | ||
<p>An optional named parameter ''desc'' can be used to include a brief description of the what the function does, which will automatically be included in its display.</p> | <p>An optional named parameter ''desc'' can be used to include a brief description of the what the function does, which will automatically be included in its display.</p> | ||
<p>Optional parameters can be displayed by | <p>Optional parameters can be displayed by wrapping them in the [[Template:Opt|Opt Template]].</p> | ||
<p> </p> | <p> </p> | ||
<pre> | <pre> | ||
Line 13: | Line 13: | ||
{{Flink|int|some_function}} | {{Flink|int|some_function}} | ||
<pre> | <pre> | ||
{{Flink|string|other_function| | {{Flink|string|other_function|{{opt|float}}|desc=This is what this bad boy does; blah de freakin' blah}} | ||
</pre> | </pre> | ||
<p>Returns:</p> | <p>Returns:</p> | ||
{{Flink|string|other_function|{{opt|float}}|desc=This is what this bad boy does; blah de freakin' blah}} | |||
[[Category:Basic Templates]] | [[Category:Basic Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 22:38, 1 March 2010
This template styles a function call so that it can be displayed as a link in (pseudo) Category pages.
This template requires at least two (unnamed) parameters to be passed; the first is the dataype returned by the function; the second is the name of the function (without parenthesis).
All additional unnamed parameters will be parsed as datatypes, in order, of the useable parameters. (Up to 8 can be supplied.)
An optional named parameter desc can be used to include a brief description of the what the function does, which will automatically be included in its display.
Optional parameters can be displayed by wrapping them in the Opt Template.
{{Flink|int|some_function}}
Returns:
int some_function()
{{Flink|string|other_function|{{opt|float}}|desc=This is what this bad boy does; blah de freakin' blah}}
Returns:
string other_function( [float] )
This is what this bad boy does; blah de freakin' blah