RosettaCodeData/Task/Detect-division-by-zero/Lingo/detect-division-by-zero.lingo
2016-12-05 23:44:36 +01:00

9 lines
184 B
Text

on div (a, b)
-- for simplicity type check of vars omitted
res = value("float(a)/b")
if voidP(res) then
_player.alert("Division by zero!")
else
return res
end if
end