Template:Function: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 1: Line 1:
<includeonly>{{#vardefine:function_name|{{#if: {{{name|}}}|{{{name}}}|{{#var:name}} }} }}{{#vardefine:use_aggregate|{{#if: {{{returns_aggregate|}}}|yes|{{#varexists:returns_aggregate|yes|no}} }} }}{{#vardefine:use_type|{{#if: {{{return_type|}}}|{{{return_type}}}|{{var:return_type}} }} }}{{#vardefine:use_also_bool|{{#if: {{{return_also|}}}|yes|{{#ifeq: {{#varexists:return_also}}|1|yes|no}} }} }}{{#vardefine:use_also_line|{{#ifeq: {{#var:use_also_bool}}|yes|{{#if: {{{return_also|}}}|{{{return_also}}}|{{#var:return_also}} }}|""}} }}<b>{{#ifeq: {{#var:use_aggregate}}|yes|[[Aggregate|{{#var:use_type}}]]|[[{{#var:use_type}}]]|}}{{#ifeq: {{#var:use_also_bool}}|no||{{#ifeq: {{#var:use_aggregate}}|yes|&nbsp;/&nbsp;[[Aggregate|{{#var:use_also_line}}]]|&nbsp;/&nbsp;[[{{#var:use_also_line}}]] }} }}&nbsp;{{#var:function_name}}(</b>{{#if: {{{param1|}}}|{{{param1}}}|{{#var:parameter1}} }}{{#if: {{{param2|}}}|&nbsp;<b>,</b>&nbsp;{{{param2}}}|{{#ifeq: {{#varexists:parameter2}}|1|&nbsp;<b>,</b>&nbsp;{{#var:parameter2}}|}} }}{{#if: {{{param3|}}}|&nbsp;<b>,</b>&nbsp;{{{param3}}}|{{#ifeq: {{#varexists:parameter3}}|1|&nbsp;<b>,</b>&nbsp;{{#var:parameter3}}|}} }}{{#if: {{{param4|}}}|&nbsp;<b>,</b>&nbsp;{{{param4}}}|{{#ifeq: {{#varexists:parameter4}}|1|&nbsp;<b>,</b>&nbsp;{{#var:parameter4}}|}} }}{{#if: {{{param5|}}}|&nbsp;<b>,</b>&nbsp;{{{param5}}}|{{#ifeq: {{#varexists:parameter5}}|1|&nbsp;<b>,</b>&nbsp;{{#var:parameter5}}|}} }}<b>)</b></includeonly>
<includeonly>
<b>{{#if: {{{aggregate|}}}|[[Aggregate|{{{return_type}}}]]|[[{{{return_type}}}]] }}{{#if: {{{return_also|}}}|&nbsp;/&nsbsp;{{#if: {{{aggregate|}}}|[[Aggregate|{{{return_also}}}]]|{{{return_also}}} }} }}&nbsp;{{{name}}}(</b>{{#if: {{{parameter1|}}}|{{{parameter1}}} }}{{#if: {{{parameter2|}}}|{{{parameter2}}} }}{{#if: {{{parameter3|}}}|{{{parameter3}}} }}{{#if: {{{parameter4|}}}|{{{parameter4}}} }}{{#if: {{{parameter5|}}}|{{{parameter5}}} }}<b>)</b>
{{#if: {{{p1desc|}}}|{{{p1desc}}}<br />}}{{#if: {{{p2desc|}}}|{{{p2desc}}}<br />}}{{#if: {{{p3desc|}}}|{{{p3desc}}}<br />}}{{#if: {{{p4desc|}}}|{{{p4desc}}}<br />}}{{#if: {{{p5desc|}}}|{{{p5desc}}}<br />}}
</includeonly>
<noinclude>This is the template to display a line of function information (for the function page template, see [[Template:FunctionPage]]). Supply the function ''name,'' the data type of the value it ''returns,'' and what, if any, ''parameters'' it takes.[[Category:Basic Templates]]</noinclude>
<noinclude>This is the template to display a line of function information (for the function page template, see [[Template:FunctionPage]]). Supply the function ''name,'' the data type of the value it ''returns,'' and what, if any, ''parameters'' it takes.[[Category:Basic Templates]]</noinclude>

Revision as of 11:06, 28 February 2010

This is the template to display a line of function information (for the function page template, see Template:FunctionPage). Supply the function name, the data type of the value it returns, and what, if any, parameters it takes.