Difference between revisions of "Template:Function"

From ComputerCraft Wiki
Jump to: navigation, search
m (I dun goofed)
m (Patch to fix display issue with "Example" appearing in plain-text.)
 
(38 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
<includeonly>
 
<includeonly>
<table style="width: 70%; border: solid 2px black; margin: 2px; padding: .3em; border-spacing: 0px;">
+
<table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;">
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid black 1px;">Function {{{name}}}</td></tr>
+
 
<tr style="background-color: #E8E8E8;"><td style="border-right: solid black 1px; padding: .2em; width: 10%; font-weight: bold;">Syntax</td>
+
<tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #DBE5FF; line-height:28px;">[[File:Grid_Redstone.png|24px]]&nbsp;&nbsp;Function {{{name}}}</td></tr>
<td style="border-color: black; padding: .2em; padding-left: .4em;">{{{name}}}({{{args}}})</td></tr>
+
 
<tr style="background-color: #FFFFFF;"><td style="border-right: solid black 1px; padding: .2em; width: 10%; font-weight: bold;">Returns</td>
+
<tr style="background-color: #FFFFFF;"><td colspan="2" style="padding: .4em; padding-bottom: .8em;">{{{desc|No description provided.}}}</td></tr>
<td style="border-color: black; padding: .2em; padding-left: .4em;">{{{returns|[[nil]]}}}</td></tr>
+
 
<tr style="background-color: #E8E8E8;"><td style="border-right: solid black 1px; padding: .2em; width: 10%; font-weight: bold;">Part of</td>
+
<tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; border-right: solid #C9C9C9 1px; padding: .4em; width: 10%; font-weight: bold;">Syntax</td>
<td style="border-color: black; padding: .2em; padding-left: .4em;">[[{{{addon|ComputerCraft}}}]]</td></tr>
+
<td style="border-top: solid #C9C9C9 1px; border-color: #C9C9C9; padding: .4em; padding-left: .8em;">{{{name}}}({{{args|}}})</td></tr>
<tr style="background-color: #FFFFFF;"><td style="border-right: solid black 1px; padding: .2em; width: 10%; font-weight: bold;">API</td>
+
 
<td style="border-color: black; padding: .2em; padding-left: .4em;">[[{{{api}}}|{{{api}}} (API)]]</td></tr>
+
<tr style="background-color: #FFFFFF;"><td style="border-right: solid #C9C9C9 1px; padding: .4em; width: 10%; font-weight: bold;">Returns</td>
</table>
+
<td style="border-color: #C9C9C9; padding: .4em; padding-left: .8em;">{{{returns|[[nil]]}}}</td></tr>
{{#if: {{{examples|}}} |
+
 
== Examples ==
+
<tr style="background-color: #E8E8E8;"><td style="border-right: solid #C9C9C9 1px; padding: .4em; width: 10%; font-weight: bold;">Part of</td>
{{{examples}}}
+
<td style="border-color: #C9C9C9; padding: .4em; padding-left: .8em;">[[{{{addon|ComputerCraft}}}]]</td></tr>
}}
+
 
{{#if: {{{notes|}}} |
+
<tr style="background-color: #FFFFFF;"><td style="border-right: solid #C9C9C9 1px; padding: .4em; width: 10%; font-weight: bold;">API</td>
== Additional Notes ==
+
<td style="border-color: #C9C9C9; padding: .4em; padding-left: .8em;">{{#if: {{{api}}} | [[{{{api}}} (API)|{{{api}}}]] | none }}</td></tr>
 +
 
 +
</table>{{#if:{{{examples|}}}|
 +
 
 +
<h2><span class="mw-headline">Examples</span></h2>
 +
{{{examples|}}}
 +
|}}{{#if:{{{notes|}}}|
 +
 
 +
<h2><span class="mw-headline">Additional Notes</span></h2>
 
{{{notes}}}
 
{{{notes}}}
}}
+
|}}
 
</includeonly>
 
</includeonly>
 
<noinclude>
 
<noinclude>
Line 29: Line 37:
 
  |returns=[[nil]]
 
  |returns=[[nil]]
 
  |addon=ComputerCraft
 
  |addon=ComputerCraft
  |examples=Examples go here
+
|desc=Sets a redstone output
 +
  |examples=Examples go here (use [[Template:Example]])
 
  |notes=
 
  |notes=
 
  * Note 1
 
  * Note 1
Line 35: Line 44:
 
  }}</nowiki>
 
  }}</nowiki>
  
Note that ''returns'', ''addon'', ''examples'' and ''notes'' are optional.
+
Note that ''args'', ''returns'', ''addon'', ''examples'' and ''notes'' are optional.
  
 
== Result ==
 
== Result ==
 
{{Function
 
{{Function
 
|name=redstone.setOutput
 
|name=redstone.setOutput
|args=[[string]] side, [[boolean]] value
+
|args=[[string_(type)|string]] side, [[boolean_(type)|boolean]] value
 
|api=redstone
 
|api=redstone
 
|returns=[[nil]]
 
|returns=[[nil]]
 
|addon=ComputerCraft
 
|addon=ComputerCraft
|examples=Examples go here
+
|desc=Sets a redstone output
 +
|examples=Examples go here (use [[Template:Example]])
 
|notes=
 
|notes=
 
* Note 1
 
* Note 1
 
* Note 2
 
* Note 2
 
}}
 
}}
 +
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 17:13, 7 January 2013


Wiki code

{{Function
 |name=redstone.setOutput
 |args=[[string]] side, [[boolean]] value
 |api=redstone
 |returns=[[nil]]
 |addon=ComputerCraft
 |desc=Sets a redstone output
 |examples=Examples go here (use [[Template:Example]])
 |notes=
 * Note 1
 * Note 2
 }}

Note that args, returns, addon, examples and notes are optional.

Result

Grid Redstone.png  Function redstone.setOutput
Sets a redstone output
Syntax redstone.setOutput(string side, boolean value)
Returns nil
Part of ComputerCraft
API redstone

Examples

Examples go here (use Template:Example)

Additional Notes

  • Note 1
  • Note 2