Module:Roman Numeral: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 124: Line 124:
     return {'',''}
     return {'',''}
     elseif num == 0 then
     elseif num == 0 then
         return {'N','0 is represented by N'}
         return {'N','\n0 is represented by N'}
     end
     end


Line 224: Line 224:
         end
         end
     end
     end
    if args.explanation == "false" then
 
        return {roman}
     return {roman, explanation}
     else
        return {roman, explanation}
    end


end
end
Line 265: Line 262:
     end
     end


    local numExplanation = pairs(_main(args))
     local res = ''
     local res = ''
     for _, v in pairs(_main(args)) do
     if args.explanation == "false" then
        res = res .. v
        for _, v in numExplanation do
            res = res .. v
        end
        return res
    else
        return numExplanation[1]
     end
     end
    return res
end
end