fbpx
วิกิพีเดีย

มอดูล:Infobox road/length

คู่มือการใช้งานมอดูล[สร้าง]
local p = {}  local math = require "Module:Math"  local function getLengths(args, num)  local precision = math._precision  local round = math._round  local format = math._precision_format  local lengths = {}  local km = args["length_km" .. num] or ''  local mi = args["length_mi" .. num] or ''  local prec = tonumber(args["length_round" .. num])  if '' == km then  local n = tonumber(mi)  prec = prec or precision(mi)  if n then  lengths.km = format(tostring(n * 1.609344), tostring(prec))  else  lengths.km = '0'  end  else  prec = prec or precision(km)  lengths.km = format(km, tostring(prec))  lengths.orig = "กิโลเมตร"  lengths.comp = "ไมล์"  end  if '' == mi then  local n = tonumber(km)  prec = prec or precision(km)  if n then  lengths.mi = format(tostring(n / 1.609344), tostring(prec))  else  lengths.mi = '0'  end  else  prec = prec or precision(mi)  lengths.mi = format(mi, tostring(prec))  lengths.orig = "กิโลเมตร"  lengths.comp = "ไมล์"  end  return lengths end  function p._length(num, args)  local ref = args["length_ref" .. num] or ''  local notes = args["length_notes" .. num] or ''  local lengths = getLengths(args, num)   local first, second  if lengths.orig == "mi" then  first = lengths.mi  second = lengths.km  else  first = lengths.km  second = lengths.mi  end  if first == '0' and second == '0' then  return  end  local text = {first, "&nbsp;", lengths.orig, ref, " (", second, "&nbsp;", lengths.comp, ")", }  if notes ~= '' then  table.insert(text, "<br><small>" .. notes .. "</small>")  end  return table.concat(text) end  function p.length(frame)  local pframe = frame:getParent()  local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself  local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template   local num = config.num or ''  return p._length(num, args) end  return p 

มอด, infobox, road, length, อการใช, งานมอด, สร, าง, ณอาจจะต, องการสร, างค, อการใช, งานของมอด, ลน, เข, ยนสามารถทำการทดลองได, กระบะทราย, สร, าง, ดลอก, และช, ดทดสอบ, สร, าง, ของมอด, ลน, โปรดเพ, มหมวดหม, ไปท, หน, าย, อย, หน, าย, อยของมอด, ลน, local, local, math, r. khumuxkarichnganmxdul srang khunxaccatxngkarsrangkhumuxkarichngankhxngmxdulniphuekhiynsamarththakarthdlxngidthikrabathray srang khdlxk aelachudthdsxb srang khxngmxdulnioprdephimhmwdhmuipthihnayxy doc hnayxykhxngmxdulnilocal p local math require Module Math local function getLengths args num local precision math precision local round math round local format math precision format local lengths local km args length km num or local mi args length mi num or local prec tonumber args length round num if km then local n tonumber mi prec prec or precision mi if n then lengths km format tostring n 1 609344 tostring prec else lengths km 0 end else prec prec or precision km lengths km format km tostring prec lengths orig kiolemtr lengths comp iml end if mi then local n tonumber km prec prec or precision km if n then lengths mi format tostring n 1 609344 tostring prec else lengths mi 0 end else prec prec or precision mi lengths mi format mi tostring prec lengths orig kiolemtr lengths comp iml end return lengths end function p length num args local ref args length ref num or local notes args length notes num or local lengths getLengths args num local first second if lengths orig mi then first lengths mi second lengths km else first lengths km second lengths mi end if first 0 and second 0 then return end local text first amp nbsp lengths orig ref second amp nbsp lengths comp if notes then table insert text lt br gt lt small gt notes lt small gt end return table concat text end function p length frame local pframe frame getParent local config frame args the arguments passed BY the template in the wikitext of the template itself local args pframe args the arguments passed TO the template in the wikitext that transcludes the template local num config num or return p length num args end return p ekhathungcak https th wikipedia org w index php title mxdul Infobox road length amp oldid 6349084, wikipedia, วิกิ หนังสือ, หนังสือ, ห้องสมุด,

บทความ

, อ่าน, ดาวน์โหลด, ฟรี, ดาวน์โหลดฟรี, mp3, วิดีโอ, mp4, 3gp, jpg, jpeg, gif, png, รูปภาพ, เพลง, เพลง, หนัง, หนังสือ, เกม, เกม