Module:interval

Hello, you have come here looking for the meaning of the word Module:interval. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:interval, but we will also tell you about its etymology, its characteristics and you will know how to say Module:interval in singular and plural. Everything you need to know about the word Module:interval you have here. The definition of the word Module:interval will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:interval, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.


local export = {}

function export.show(frame)
	-- ]
	-- it changes parameters order from original to unpredictable
	-- example: |p=15|10=1|20=2|30=3 >> |30=3|p=15|20=2|10=1 (1234 >> 4132)
	local args = frame:getParent().args
	
	local p = ( args and tonumber(args) or error("Missing parameter 'p' (position-X)") )
	
	local bottom
	for border in pairs(args) do
		if border~="p" and border~="default" then
			border = tonumber(border)
			if p >= border then	-- this border is bottom
				if bottom==nil or border > bottom then	-- old bottom is farther
					bottom = border
				end
			end
		end
	end
	
	if bottom==nil then
		return (args or "")
	end
	
	bottom = args
	if bottom=="@" then
		return (args or "")
	end
	
	return bottom
end

return export