Jump to content

Module:Repeat symbols

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Erik Zachte (talk | contribs) at 19:53, 16 September 2014. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p = {}
 
function p.repeat_10_1 ( frame )
    a    = frame.args[1] ;
    img1 = frame.args[2] ;
    img2 = frame.args[3] ;

    mod10 = a % 10 ;
    div10 = math.floor (a/10) ; 

    return a .. '|' .. div10 .. '|' .. mod10 .. '<br>' .. string.rep(img1,div10) .. ' - ' .. string.rep(img2,mod10) 
    
end
 
return p