Module:Primes in edo fs: Difference between revisions

ArrowHead294 (talk | contribs)
m +Debugging option
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
local p = {}
local p = {}
local yesno = require("Module:Yesno")


-- greatest common divisor of a and b
-- greatest common divisor of a and b
Line 167: Line 169:
   local fs = (frame.args["fs"] == 1) or (frame.args["fs"] == "1") or false
   local fs = (frame.args["fs"] == 1) or (frame.args["fs"] == "1") or false
    
    
   local out_str = edoprox( edo, {unpack(primes, start, start+columns-1)}, title, prec, fs)
   local result = edoprox( edo, {unpack(primes, start, start+columns-1)}, title, prec, fs)
   local debugg = frame.args["debug"]
 
   return frame:preprocess(debugg == "true" and "<pre>" .. out_str .. "</pre>" or out_str)
  -- debugger option
   local debugg = yesno(frame.args["debug"])
   if debugg == true then
    result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
  end
 
  return frame:preprocess(result)
end
end


return p;
return p