Module:Convert: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(when input unit is invalid, show input value and unit code plus error message (not just an error message)) |
(oh what complex webs we weave ... bad input unit includes no input unit) |
||
Line 1,547: | Line 1,547: | ||
local success, in_unit_table = lookup(in_unit, parms.opt_sp_us, 'no_combination') |
local success, in_unit_table = lookup(in_unit, parms.opt_sp_us, 'no_combination') |
||
if not success then |
if not success then |
||
if in_unit == nil then |
|||
in_unit = '' |
|||
end |
|||
in_unit_table = setmetatable({ symbol = in_unit, name2 = in_unit, utype = "length", scale = 1, bad_mcode = in_unit_table }, unit_mt) |
in_unit_table = setmetatable({ symbol = in_unit, name2 = in_unit, utype = "length", scale = 1, bad_mcode = in_unit_table }, unit_mt) |
||
end |
end |