RosettaCodeData/Task/Detect-division-by-zero/AutoHotkey/detect-division-by-zero.ahk
2023-07-01 13:44:08 -04:00

8 lines
205 B
AutoHotkey

ZeroDiv(num1, num2) {
If ((num1/num2) != "")
MsgBox % num1/num2
Else
MsgBox, 48, Warning, The result is not valid (Divide By Zero).
}
ZeroDiv(0, 3) ; is ok
ZeroDiv(3, 0) ; divize by zero alert