Difference between revisions of "Template:FunctionArgument"
Jump to navigation
Jump to search
imported>SnakeChomp m (Template:FunctionArgumentTest moved to Template:FunctionArgument: Done testing. The template can work, move it to its real name.) |
imported>SnakeChomp m (Fix eamples to use new template name) |
||
Line 18: | Line 18: | ||
}}</pre> | }}</pre> | ||
{{ | {{FunctionArgument | ||
|Name = foo | |Name = foo | ||
|Type = int | |Type = int | ||
Line 29: | Line 29: | ||
}}</pre> | }}</pre> | ||
{{ | {{FunctionArgument | ||
|Value = 0, 1 | |Value = 0, 1 | ||
}} | }} | ||
Line 40: | Line 40: | ||
}}</pre> | }}</pre> | ||
{{ | {{FunctionArgument | ||
|Name = flag | |Name = flag | ||
|Value = 0, 1 | |Value = 0, 1 | ||
Line 53: | Line 53: | ||
}}</pre> | }}</pre> | ||
{{ | {{FunctionArgument | ||
|Name = foo | |Name = foo | ||
|Type = int | |Type = int |
Revision as of 17:11, 30 January 2009
Template syntax
{{FunctionArgument |Name = The name of the function argument. May be omitted, but it only makes sense to do so when ''Values'' is specified. |Type = The type of the function argument (int, float, ref) |Optional = If specified, the argument is optional |Values = If specified, the given set of values is shown instead of the type }}
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}
Example 4
{{FunctionArgument |Name = foo |Type = int |Optional = y }}
foo:int