RosettaCodeData/Task/Detect-division-by-zero/Lingo/detect-division-by-zero.lingo
2023-07-01 13:44:08 -04: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