View source for Module:ArgumentPairs demo

Jump to navigation Jump to search

You do not have permission to edit this page, for the following reason:

The action you have requested is limited to users in the group: contributor.


You can view and copy the source of this page.

local p = {}
function comp(x,y)
return tostring(x[1])<tostring(y[1])
end
function p.f(frame)
local t={}
for n,v in frame:argumentPairs() do table.insert (t,{n,v}) end
table.sort (t,comp)
r = '{|class="wikitable sortable"\n!name!!value\n'
for i,nv in ipairs(t) do r = r..'|-\n|'..nv[1]..'||'..nv[2]..'\n' end
r=r..'|}'
return r
end
return p
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
000
1:0
Debug console
* The module exports are available as the variable "p", including unsaved modifications. * Precede a line with "=" to evaluate it as an expression or use print(). Use mw.logObject() for tables. * Use mw.log() and mw.logObject() in module code to send messages to this console.

Return to Module:ArgumentPairs demo.