跳转到内容

模組:Pn/doc

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是Module:Pn/doc当前版本,由A2569875留言 | 贡献编辑于2022年5月14日 (六) 09:19 建立内容为“{{NoteTA/MediaWiki}} {{Documentation subpage}}<!-- 在本行下編輯模組說明 --> The module returns one value from its list of unnamed parameters. The named parameter {{para|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 == * <code><nowiki>{{#invoke:Pn |getVal | idx=1}}</nowiki></code> → {{#invoke:Pn |…”的新页面)。这个网址是本页该版本的固定链接。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

这是Module:Pn的文档页面

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=0 | a | b | c | d | e | f }}
  • {{#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
  • {{#invoke:Pn |getVal | idx=99 | a | b | c | d | e | f }}

Using a wrapper template, {{P-1}}:

  • {{p-1 | a | b | c | d | e | f }} → f
  • {{wdib|ps=1|P8011|qid=Q84055514}}
  • {{wdib|ps=1|P8011|qid=Q84055514|list=p-1}}