Template:Function: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 5: Line 5:
{{#vardefine:use_also_bool|{{#if: {{{returns_also|}}}|yes|{{#varexists:returns_also|yes|no}} }} }}
{{#vardefine:use_also_bool|{{#if: {{{returns_also|}}}|yes|{{#varexists:returns_also|yes|no}} }} }}
{{#vardefine:use_also_line|{{#ifeq: {{#var:use_also_bool}}|no||{{#if: {{{returns_also|}}}|{{{returns_also}}}|{{#var:returns_also}} }} }} }}
{{#vardefine:use_also_line|{{#ifeq: {{#var:use_also_bool}}|no||{{#if: {{{returns_also|}}}|{{{returns_also}}}|{{#var:returns_also}} }} }} }}
 
<b>
{{#ifeq: {{#var:use_aggregate}}|yes|[[Aggregate|{{#var:use_type}}]]|[[{{#var:use_type}}]]|}}
{{#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}}]]'''}} }}
{{#ifeq: {{#var:use_also_bool}}|no||{{#ifeq: {{#var:use_aggregate}}|yes|&nbsp;/&nbsp;[[Aggregate|{{#var:use_also_line}}]]|&nbsp;/&nbsp;[[{{#var:use_also_line}}]]}} }}
<b>{{#var:name}}(</b>{{#if: {{{param1|}}}|{{{param1}}}|{{#var:parameter1}} }}{{#if: {{{param2|}}}|&nbsp;,&nbsp;{{{param2}}}|{{#ifeq: {{#varexists:parameter2}}|1|&nbsp;,&nbsp;{{#var:parameter2}}|}} }}{{#if: {{{param3|}}}|&nbsp;,&nbsp;{{{param3}}}|{{#ifeq: {{#varexists:parameter3}}|1|&nbsp;,&nbsp;{{#var:parameter3}}|}} }}{{#if: {{{param4|}}}|&nbsp;,&nbsp;{{{param4}}}|{{#ifeq: {{#varexists:parameter4}}|1|&nbsp;,&nbsp;{{#var:parameter4}}|}} }}{{#if: {{{param5|}}}|&nbsp;,&nbsp;{{{param5}}}|{{#ifeq: {{#varexists:parameter5}}|1|&nbsp;,&nbsp;{{#var:parameter5}}|}} }}<b>)</b>
{{#var:name}}(</b>{{#if: {{{param1|}}}|{{{param1}}}|{{#var:parameter1}} }}{{#if: {{{param2|}}}|&nbsp;,&nbsp;{{{param2}}}|{{#ifeq: {{#varexists:parameter2}}|1|&nbsp;,&nbsp;{{#var:parameter2}}|}} }}{{#if: {{{param3|}}}|&nbsp;,&nbsp;{{{param3}}}|{{#ifeq: {{#varexists:parameter3}}|1|&nbsp;,&nbsp;{{#var:parameter3}}|}} }}{{#if: {{{param4|}}}|&nbsp;,&nbsp;{{{param4}}}|{{#ifeq: {{#varexists:parameter4}}|1|&nbsp;,&nbsp;{{#var:parameter4}}|}} }}{{#if: {{{param5|}}}|&nbsp;,&nbsp;{{{param5}}}|{{#ifeq: {{#varexists:parameter5}}|1|&nbsp;,&nbsp;{{#var:parameter5}}|}} }}<b>)</b>
</includeonly>
</includeonly>

Revision as of 09:50, 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.