Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Test: Difference between revisions

From ProleWiki, the proletarian encyclopedia
m (More testing)
m (More testing)
Line 2: Line 2:
function p.test(frame)
function p.test(frame)
local args = frame:getParent().args
local args = frame:getParent().args
local num = {}
for k,v in pairs(args) do
for k,v in pairs(args) do
local num = k:match('^parameter(%d+)$')
local temnum = k:match('^parameter(%d+)$')
return tostring(num)
if temnum then table.insert(num, tonumber(temnum))
end
return tostring(table.concat(num))
end
end
end
end
return p
return p

Revision as of 00:39, 24 June 2022

local p = {}
function p.test(frame)
	local args = frame:getParent().args
	local num = {}
	for k,v in pairs(args) do
		local temnum = k:match('^parameter(%d+)$')
		if temnum then table.insert(num, tonumber(temnum))
		end
	return tostring(table.concat(num))
	end
end
return p