Module:Xpd/doc

Expansion demo, like Template:Xpd. Examples:

gives:

gives:

For parameters with explicit positive integer names the integer is reduced by 1 in the result (just like for implicit names, due to the position taken by the template name in the invocation of the module). They are ordered in ascending order. Spaces are trimmed from their values, even at the left side of the output, and the explicit names are removed (so the output does not demonstrate this trimming).

gives:

Limitations
For templates only (not for variables or parser functions).

gives:

Parameters with explicit or implicit positive integer names have to form a set {1, 2, .. k} without gaps. the reason it that at the left side of the output these names are all implicit. The module cannot determine which were written explicitly in the invocation, except when there is a space or newline at the start or end of the value, then the parameter name was implicit. Writing all explicitly would give wrong output, since the righthand side is based on parameters being implicit or explicit (they would be trimmed in the latter case), in accordance with what they were in the invocation of the module.

Example:

gives: (wrong)