Difference between revisions of "Template:Flink"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
(Created page with '<includeonly> <p><b>{{{1}}} {{{2}}}{{#ifexpr: {{{#if: {{{3|}}} }} or {#if: {{{op1|}}} }} or {#if: {{{op2|}}} }} or {#if: {{{op3|}}} }} or {#if: {{{op4|}}} }} or {#if: {{{op5…')
 
imported>StDoodle
Line 9: Line 9:
 
<p>Optional parameters can be displayed by passing up to 5 named parameter, "op1" through "op2".</p>
 
<p>Optional parameters can be displayed by passing up to 5 named parameter, "op1" through "op2".</p>
 
<pre>
 
<pre>
 
+
{{Flink|int|some_function}}
 
</pre>
 
</pre>
<p>Returns: </p>
+
<p>Returns: {{Flink|int|some_function}}</p>
 
<pre>
 
<pre>
 
+
{{Flink|string|op1=float|desc=This is what this bad boy does; blah de freakin' blah}}
 
</pre>
 
</pre>
<p>Returns: </p>
+
<p>Returns: {{Flink|string|op1=float|desc=This is what this bad boy does; blah de freakin' blah}}</p>
 
[[Category:Basic Templates]]
 
[[Category:Basic Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 16:32, 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 required parameters. (Up to 5 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 passing up to 5 named parameter, "op1" through "op2".

{{Flink|int|some_function}}

Returns:

int some_functionExpression error: Unrecognized punctuation character "{". or {#if: }} or {#if: }} or {#if: }} or {#if: }} | |()}}

{{Flink|string|op1=float|desc=This is what this bad boy does; blah de freakin' blah}}

Returns:

string {{{2}}}Expression error: Unrecognized punctuation character "{". or {#if: }} or {#if: }} or {#if: }} or {#if: }} | [float] |()}}

This is what this bad boy does; blah de freakin' blah