Difference between revisions of "User:StDoodle/Function sandbox"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m
imported>StDoodle
m
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>This is the main function template. Supply the function ''name,'' the data type of the value it ''returns,'' and what, if any, ''parameters'' it takes.</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.</noinclude>
<includeonly>{{#customtitle:{{{name}}}()|{{{name}}}()}}<nowiki></nowiki>'''[[{{{returns}}}]]'''<nowiki></nowiki>{{#if: {{{returns2|}}}|&nbsp;/ '''[[{{{returns2}}}]]''' }}<nowiki> </nowiki>'''{{{name}}}('''<nowiki></nowiki>{{#if: {{{parameter1|}}}|{{{parameter1}}}}}{{#if: {{{parameter2|}}}|, {{{parameter2}}}}}{{#if: {{{parameter3|}}}|, {{{parameter3}}}}}{{#if: {{{parameter4|}}}|, {{{parameter4}}}}}{{#if: {{{parameter5|}}}|, {{{parameter5}}}}}<nowiki></nowiki>''')'''
+
<includeonly>'''[[{{{returns}}}]]'''<nowiki></nowiki>{{#if: {{{returns2|}}}|&nbsp;/ '''[[{{{returns2}}}]]''' }}<nowiki> </nowiki>'''{{{function_name}}}('''<nowiki></nowiki>{{#if: {{{parameter1|}}}|{{{parameter1}}}}}{{#if: {{{parameter2|}}}|, {{{parameter2}}}}}{{#if: {{{parameter3|}}}|, {{{parameter3}}}}}{{#if: {{{parameter4|}}}|, {{{parameter4}}}}}{{#if: {{{parameter5|}}}|, {{{parameter5}}}}}<nowiki></nowiki>''')'''
<p>{{{description|}}}</p>
+
{{#if: {{{p1desc|}}}|<p>Where {{{parameter1}}} is {{{p1desc}}}</p>}}{{#if: {{{p2desc|}}}|<p>Where {{{parameter2}}} is {{{p2desc}}}</p>}}{{#if: {{{p3desc|}}}|<p>Where {{{parameter3}}} is {{{p3desc}}}</p>}}{{#if: {{{p4desc|}}}|<p>Where {{{parameter4}}} is {{{p4desc}}}</p>}}{{#if: {{{p5desc|}}}|<p>Where {{{parameter5}}} is {{{p5desc}}}</p>}}{{#if: {{{description|}}}|<p>{{{description}}}</p>}}
{{#if: {{{p1desc|}}}|<p>{{{p1desc}}}</p>}}
 
{{#if: {{{codeblock1}}}|{{{codeblock1}}}}}
 
[[Category:Test Functions]]
 
 
</includeonly>
 
</includeonly>

Latest revision as of 06:37, 25 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.