Module:VarTestSandbox

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:13, 17 October 2024 (Created page with "local p = {} local var = mw.ext.VariablesLua function p.set(frame) for i=1,100 do mw.log(i, "set") var.vardefine(string.format("bigvar%d", i), i*i) end end function p.get(frame) local out = {} for i=1,100 do mw.log(i, "get") table.insert(out, var.var(i)) end return table.concat(out, "") end return p"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:VarTestSandbox/doc

local p = {}

local var = mw.ext.VariablesLua


function p.set(frame)
	for i=1,100 do
		mw.log(i, "set")
		var.vardefine(string.format("bigvar%d", i), i*i)
	end
end

function p.get(frame)
	local out = {}
	for i=1,100 do
		mw.log(i, "get")
		table.insert(out, var.var(i))
	end
	return table.concat(out, "")
end

return p