« Module:Romain » : différence entre les versions

Contenu supprimé Contenu ajouté
Ajout fonction fromRoman, et les fonctions permettant d'utiliser le module depuis un modèle
Aucun résumé des modifications
Ligne 21 :
 
 
function p.toRoman( num, default )
num = tonumber( num )
if not num or num < 1 or num == math.huge then
return
Ligne 87 :
end
 
-- compatibilitécompatibility avecwith [[en:Module:Roman]]
function p._main(args)
return p.toRoman( args[1] )
Ligne 96 :
end
 
-- functions to call the module from a template (takes the #invoke first arg or the template first arg)
function p.nombreEnRomain( frame )
local num