Difference between revisions of "Template:FunctionArgument"
Jump to navigation
Jump to search
Add example for optional arg
imported>SnakeChomp (Try out optional syntax) |
imported>SnakeChomp (Add example for optional arg) |
||
Line 33: | Line 33: | ||
|Name = flag | |Name = flag | ||
|Value = {0, 1} | |Value = {0, 1} | ||
}} | |||
=Example 4= | |||
<pre>{{FunctionArgument | |||
|Name = foo | |||
|Type = int | |||
|Optional = y | |||
}}</pre> | |||
{{FunctionArgumentTest | |||
|Name = foo | |||
|Type = int | |||
|Optional = y | |||
}} | }} | ||
</noinclude><includeonly> {{#if: {{{Optional|}}} | '' |}}{{#if: {{{Name|}}} | {{{Name}}} |}}{{#if: {{{Value|}}} | {{{Value}}} | <nowiki>:</nowiki>{{{Type}}}}}{{#if: {{{Optional|}}} | '' |}}</includeonly> | </noinclude><includeonly> {{#if: {{{Optional|}}} | '' |}}{{#if: {{{Name|}}} | {{{Name}}} |}}{{#if: {{{Value|}}} | {{{Value}}} | <nowiki>:</nowiki>{{{Type}}}}}{{#if: {{{Optional|}}} | '' |}}</includeonly> |