Template:FunctionDeclaration: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
   | <kbd><b>{{type|{{data|{{{name}}}|function{{{func}}}.return_type}}}} [[{{data|{{{name}}}|name}}]]({{
   | <kbd><b>{{type|{{data|{{{name}}}|function{{{func}}}.return_type}}}} [[{{data|{{{name}}}|name}}]]({{
     #if: {{data|{{{name}}}|function{{{func}}}.param1.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param1.type}}
     |&nbsp;{{param2|name={{{name}}}|func={{{func}}}|param=1}}}}{{
     |&nbsp;{{param2|name={{{name}}}|func={{{func}}}|param=1|format={{{format}}}}}}}{{
     #if: {{data|{{{name}}}|function{{{func}}}.param2.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param2.type}}
     |, {{param2|name={{{name}}}|func={{{func}}}|param=2}}}}{{
     |, {{param2|name={{{name}}}|func={{{func}}}|param=2|format={{{format}}}}}}}{{
     #if: {{data|{{{name}}}|function{{{func}}}.param3.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param3.type}}
     |, {{param2|name={{{name}}}|func={{{func}}}|param=3}}}}{{
     |, {{param2|name={{{name}}}|func={{{func}}}|param=3|format={{{format}}}}}}}{{
     #if: {{data|{{{name}}}|function{{{func}}}.param4.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param4.type}}
     |, {{param2|name={{{name}}}|func={{{func}}}|param=4}}}}{{
     |, {{param2|name={{{name}}}|func={{{func}}}|param=4|format={{{format}}}}}}}{{
     #if: {{data|{{{name}}}|function{{{func}}}.param5.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param5.type}}
     |, {{param2|name={{{name}}}|func={{{func}}}|param=5}}}}{{
     |, {{param2|name={{{name}}}|func={{{func}}}|param=5|format={{{format}}}}}}}{{
     #if: {{data|{{{name}}}|function{{{func}}}.param1.type}}
     #if: {{data|{{{name}}}|function{{{func}}}.param1.type}}
     |&nbsp;}})</b></kbd>
     |&nbsp;}})</b></kbd>
Line 49: Line 49:


{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2}}
{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2}}
<pre>{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2|format=signature}}</pre>
{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2|format=signature}}


<pre>{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=4}}</pre>
<pre>{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=4}}</pre>

Revision as of 23:46, 18 December 2020


Displays an ASH function's declaration. This is meant to be transcluded by other templates, rather than regular pages.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Function page namename

Name of a function page. '''This must be a data page.'''

Page namerequired
Overloaded function numberfunc

A function page may describe multiple overloaded functions under the same name. This parameter allows you to select one. Allowed values are 1-5, inclusive.

Numberrequired
Rendering formatformat

"" (empty string) = show everything, "signature" = only show parameter types (i.e. function signature). Default value is empty string (show everything).

Lineoptional

Examples

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=1}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along. )

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along. )

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=2|format=signature}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.?, Nothing to see here, move along.?, Nothing to see here, move along.?, Nothing to see here, move along.?, Nothing to see here, move along.? )

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=4}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along. )

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox|func=0}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along. )

{{FunctionDeclaration|name=User:Philmasterplus/Sandbox}}

Nothing to see here, move along. Nothing to see here, move along.( Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along., Nothing to see here, move along.? Nothing to see here, move along. = Nothing to see here, move along. )