Template:FunctionDeclaration: Difference between revisions
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}} | ||
| {{param2|name={{{name}}}|func={{{func}}}|param=1}}}}{{ | | {{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}} | ||
| }})</b></kbd> | | }})</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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Function page name | name | Name of a function page. '''This must be a data page.''' | Page name | required |
Overloaded function number | func | 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. | Number | required |
Rendering format | format | "" (empty string) = show everything, "signature" = only show parameter types (i.e. function signature). Default value is empty string (show everything). | Line | optional |
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. )