Module:Sandbox/Seppi333/url

Revision as of 02:32, 31 August 2019 by imported>Seppi333 (c)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Sandbox/Seppi333/url/doc

local url = require('Module:URL')._url
local getArgs = require('Module:Arguments').getArgs
local buffer = require("Module:Buffer")('{|')

local p = {}

p.main = function(frame)
	printtext = "Logout link: "
    return printtext, url("https://en.wikipedia.org/wiki/Special:UserLogout")
end

p.hello = function(frame)
	return("\"Hello World!\" is an overused example phrase.")
end

local function makeInvokeFunc(funcName) -- An invoke function to permit multiple functions with different arguments
	return function(frame)
		local args = getArgs(frame)
		return p[funcName](args)
	end
end
-- End of invoke function

function p._func1(args) 
	-- Code for the first function goes here.
	--[[ 
	local mathtable = {}
	return function(t1=tonumber(exp1), t2=tonumber(exp2))
		local i=0
		repeat
			block
			i = i + 1
			end
		until i=(t2-t1)
		return mathtable
	end
	--]]
end

function p._func2(args)
	-- Code for the second function goes here.
end

-- Define invokable functions:
p.url = p.main
-- p.math = makeInvokeFunc('_func1') -- DECENSOR THIS LINE AFTER p._func1(args) IS COMPLETE
-- p.sequence = makeInvokeFunc('_func2') -- DECENSOR THIS LINE AFTER p._func2(args) IS COMPLETE


-- End of script

return p