Module:Utils: Difference between revisions
Bug fixing |
Made eval_num_arg global (for use in other modules only, not in regular pages) |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
-- evaluate input on error use default | -- evaluate input on error use default; cannot be used with {{#invoke:}} | ||
function p.eval_num_arg(input, def_value) | |||
local result = input | local result = input | ||
if type(input) ~= 'number' then | if type(input) ~= 'number' then |