Jump to content

Module:Pn/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by RexxS (talk | contribs) at 17:59, 15 May 2020 (Creating Module:Pn/doc). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The module returns one value from its list of unnamed parameters.

The named parameter |idx= is the index of the parameter that is to be returned.

Negative indices count backward from the end of the list.

A wrapper template may be used to simplify usage.

Examples

  • {{#invoke:Pn |getVal | idx=1}}
  • {{#invoke:Pn |getVal | idx= | a | b | c | d | e | f }} → a
  • {{#invoke:Pn |getVal | idx=1 | a | b | c | d | e | f }} → a
  • {{#invoke:Pn |getVal | idx=2 | a | b | c | d | e | f }} → b
  • {{#invoke:Pn |getVal | idx=-1 | a | b | c | d | e | f }} → f