Difference between revisions of "Template:FunctionArgument"
Jump to navigation
Jump to search
imported>SnakeChomp m (Minor change to refresh to page to reflect template change) |
imported>SnakeChomp (Make name optional. More examples.) |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
=Example 1= | =Example 1= | ||
<pre>{{FunctionArgument | <pre>{{FunctionArgument | ||
|Name = foo | |Name = foo | ||
| | |Type = int | ||
}}</pre> | }}</pre> | ||
{{FunctionArgumentTest | {{FunctionArgumentTest | ||
|Name = foo | |Name = foo | ||
|Type = int | |||
}} | |||
=Example 2= | |||
<pre>{{FunctionArgument | |||
|Values = {0, 1} | |||
}}</pre> | |||
{{FunctionArgumentTest | |||
|Value = {0, 1} | |Value = {0, 1} | ||
}} | }} | ||
=Example | =Example 3= | ||
<pre>{{FunctionArgument | <pre>{{FunctionArgument | ||
|Name = | |Name = flag | ||
| | |Values = {0, 1} | ||
}}</pre> | }}</pre> | ||
{{FunctionArgumentTest | {{FunctionArgumentTest | ||
|Name = | |Name = flag | ||
| | |Value = {0, 1} | ||
}} | }} | ||
</noinclude><includeonly> {{{Name}}}{{#if: {{{Value|}}} | {{{Value}}} | <nowiki>:</nowiki>{{{Type}}}}}</includeonly> | </noinclude><includeonly> {{#if: {{{Name|}}} | {{{Name}}} |}}{{#if: {{{Value|}}} | {{{Value}}} | <nowiki>:</nowiki>{{{Type}}}}}</includeonly> |
Revision as of 16:24, 30 January 2009
Example 1
{{FunctionArgument |Name = foo |Type = int }}
foo:int
Example 2
{{FunctionArgument |Values = {0, 1} }}
{0, 1}
Example 3
{{FunctionArgument |Name = flag |Values = {0, 1} }}
flag{0, 1}