请输入您要查询的百科知识:

 

词条 Module:LoMP
释义

local p = {}

function p.LoMP(frame)

-- For calling from #invoke.

local pframe = frame:getParent()

local args = pframe.args

return p._LoMP(args)

end

function p._LoMP(args)

local link, result

-- For calling from other Lua modules.

local num = tonumber(args[1])

local subsec = string.sub(tostring(num + 1000), -3)

if (num <= 1000) then

link = "List of minor planets: 1–1000#" .. subsec

else

local pagefrom = math.floor((num - 1) / 1000)

local pageto = pagefrom + 1

link = "List of minor planets: " .. pagefrom .. "001–" .. pageto .. "000#" .. subsec

end

if (args[2] == nil) then

result = "" .. link .. ""

else

result = "" .. args[2] .. ""

end

return result

end

return p

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/14 13:52:05