Changes

Jump to navigation Jump to search
m
Wargo moved page Module talk:ArgumentPairs demo to Module:ArgumentPairs demo/doc without leaving a redirect: This is module description, not talk
This module shows the sorted name-value combinations from parameter definitions like in a template call.

Example (the f is not part of the parameter definitions):

<code><nowiki>{{#invoke:ArgumentPairs demo|f|hi=c|g|e=y|d|h=i}}</nowiki></code> gives:

{{#invoke:ArgumentPairs demo|f|hi=c|g|e=y|d|h=i}}

Assignments are done from left to right, in the case of multiple assignments to the same parameter (named or unnamed) the last one counts:

<code><nowiki>{{#invoke:ArgumentPairs demo|f|1=q|hi=c|g|e=y|d|h=i|e=k|2=p}}</nowiki></code> gives:

{{#invoke:ArgumentPairs demo|f|1=q|hi=c|g|e=y|d|h=i|e=k|2=p}}

==Types==
Types of the results of "for n,v in frame:argumentPairs() do" inside the lua program:
*n is of type number if it is implicitly given, or if the supplied wikitext for it represents an integer value, otherwise string
*v is of type string
Anonymous user

Navigation menu