Template:Pp
{{Pp|?|...}}
This template contains {{{{{{1}}}}}}
.
If the first parameter is an integer > 1 this template corresponds to:
{{p{{#expr:{{{1}}}-1}}|{{{2}}}|{{{3}}}|{{{4}}}|..}}
Apart from the fact that it does not trim the result it also corresponds to:
{{#switch:{{{1}}}|2={{{2}}}|3={{{3}}}|4={{{4}}}|..}}
or similar with other parameter names.
If lb is a lower bound on the values of {{{1}}}
we can use {{pp|{{#expr:{{{1}}}+2-lb}}|fa|fb|..}}
. This not only allows low values of {{{1}}}
if the lower bound is less than 2, but it also reduces the parameter numbers if the lower bound is greater than 2. For example, if {{{1}}}
is in the range 100-110 we can use unnamed parameters without specifying dummy values for the parameters 2-99: {{pp|{{#expr:{{{1}}}-98}}|f100|f101|..}}
.
Usage
[edit]"{{pp| a | a = 9 | b = 7 }}"
gives "9""{{pp| b | a = 9 | b = 7 }}"
gives "7"
Compare:
{{sw|2||2| 9 |3| 7 }}
gives "9"{{sw|3||2| 9 |3| 7 }}
gives "7"
Trimming:
{{#switch:2|2= 9 |3= 7 }}
gives "9"{{#switch:3|2= 9 |3= 7 }}
gives "7"