Navigation menu

Module:Yesno: Difference between revisions

From The Kodiak Republic Wiki

fix bugs highlighted in Module talk:Yesno/testcases
(removing code that's no longer used)
(fix bugs highlighted in Module talk:Yesno/testcases)
Line 29:
val = args[1]
 
-- First deal with the case if val is nil or "¬", then deal with other cases.
if val == nil or val == '¬' then
return retvals['¬']
end
Line 39:
if val == '' then
return retvals['blank'] or retvals['no']
elseif val == 'n' or val == 'no' or tonumber(val) == '0' then
return retvals['no']
elseif val == 'y' or val == 'yes' or tonumber(val) == '1' or retvals['def'] == nil then
return retvals['yes']
elseif val == '¬' then
return retvals['¬']
else
return retvals['def'] or retvals['yes']
end
end
Cookies help us deliver our services. By using our services, you agree to our use of cookies.