tag:blogger.com,1999:blog-7237530825191390698.post8967495590439762917..comments2024-03-08T20:18:18.649+11:00Comments on Software Development: Ignore Divide By ZeroAndrewhttp://www.blogger.com/profile/09583922517961948560noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-7237530825191390698.post-76074267645615972332020-08-06T22:09:03.184+10:002020-08-06T22:09:03.184+10:00Looking at this again technically this is bad advi...Looking at this again technically this is bad advice, at least for C (and C++) since the language explicitly states that division by zero is undefined. In theory a C compiler is allowed to do anything, like return zero, for integer division by zero. In practice all implementations will generate a runtime error. (If not don't use them.)<br /><br />For most other languages, with less undefined behaviour, the advice is technically sound. For example, in Go spec. states that divide by zero will cause a runtime panic.Andrewhttps://www.blogger.com/profile/09583922517961948560noreply@blogger.com