Content deleted Content added
m Partial revert, stripped tags error. Code tags don't render a template inert, and can't surround an active {{x3}} (or really most anything within a {{ }} bracket pairing) without triggering a stripped tag error. |
m →Expressions containing a parameter, with default: syntaxhighlight |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 16:
The expression for the parameter name can also contain <code>|</code>, as part of full template or parameter syntax within it.
Examples, using <code><nowiki>{{x3}}</nowiki></code> containing <syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*<syntaxhighlight lang="
*:<syntaxhighlight lang="
*<syntaxhighlight lang="
==Expressions containing a parameter, with default==
Line 61:
For comparison using a="if" and c=d="", and also the shorter class name "if" instead of "HiddenStructure", the two lines are:
<syntaxhighlight lang="wikitext">
{{{ if{{{b|}}} | ... }}}
</syntaxhighlight>
In the second method the wikitext in the template is 15 characters shorter for each optional item, but each call is 4 characters ("if=|") longer.
Line 73 ⟶ 74:
{{Tim|fors}}, containing:
----
<syntaxhighlight lang="
|v@=
|c={{{call}}}
Line 87 ⟶ 88:
with {{Tim|fors/aux}}, containing:
----
<syntaxhighlight lang="
{{{v{{{2}}}|{{{s}}}{{{{{c}}}|{{{pc1}}}|{{{pc2}}}|{{{pc3}}}|{{{pc4}}}|{{{pv}}}={{{2}}}}}}}}
{{{v{{{3}}}|{{{s}}}{{{{{c}}}|{{{pc1}}}|{{{pc2}}}|{{{pc3}}}|{{{pc4}}}|{{{pv}}}={{{3}}}}}}}}</syntaxhighlight>
Line 94 ⟶ 95:
In short form the latter consists of components
<syntaxhighlight lang="
or in terms of the parameters of the first template:
<syntaxhighlight lang="
This is indeed of the above-mentioned form <code>[a[b|c]|f([b])]</code>, with {{mono|1=a=v, b=''i'', c=@}}, and
<syntaxhighlight lang="
The assumptions mentioned above apply for d equal to null, and provided that no [''i''] is equal to "@".
Line 108 ⟶ 109:
===Variations===
Since {{code|1=v@=null}} we can also take make the concatenation the outer operation:
<syntaxhighlight lang="
==Conditional statement==
{{Tim|if}} contains:
----
<syntaxhighlight lang="
----
or in short form:
<syntaxhighlight lang="
If
<syntaxhighlight lang="
For test equal to null this reduces to
If
<syntaxhighlight lang="
==Last-but technique==
|